Thread: Notes to level?
View Single Post
Quote:
Originally Posted by kcjimmyk View Post
What I would like to do now is promote the notes to a level in the outline. Is this possible?
If you are happy install a script on the OO toolbar, or in the Script Menu, you could experiment with this. It is intended to convert the notes of any selected rows to child rows.
This draft aims to preserve any attachments in the note, but always back up your file before trying anything like this, and experiment first with dummy data ...

Code:
-- Ver 0.5

-- 	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-- 	"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
-- 	THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-- 	IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 
-- 	ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-- 	 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
-- 	 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
-- 	 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
-- 	 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

property pNullString : ""

tell application id "com.omnigroup.OmniOutlinerPro3"
	set oSeln to selected rows of front document
	repeat with oRow in oSeln
		tell oRow
			set strNote to note
			if (length of strNote) > 0 then
				set topic of (make new row at before first child) to note
				set {note expanded, note, expanded} to {false, pNullString, true}
			end if
		end tell
	end repeat
end tell

Last edited by RobTrew; 2010-06-24 at 03:31 PM.. Reason: Edited code to ver 0.5 (simplified)