View Single Post
Sorry I didn't see this thread much sooner! The solution is to manipulate the contents of the note directly, rather than trying to make a copy as rich text (which loses attachments).

Here's an example:

Code:
tell application "OmniFocus"
	tell front document
		tell document window 1
			set theSelectedItems to selected trees of content
		end tell
		repeat with selectedItem in theSelectedItems
			tell value of selectedItem
				if note is "" then
					-- Workaround for bug in 1.6 where empty notes ignore edits (fixed in 1.7)
					set note to "Omni web site"
				else
					tell note to insert "Omni web site" & return at before first character
				end if
				tell note to set value of attribute "link" of style of paragraph 1 to "http://www.omnigroup.com/"
			end tell
		end repeat
	end tell
end tell
Hope this helps!