View Single Post
Got it working: this version removes the WBS numbers e.g. if you need to renumber the tasks or after exporting to WBS.

Code:
tell application "OmniPlan"
	tell front document
		repeat with MyTask in tasks
			tell MyTask
				set tid to AppleScript's text item delimiters
				set AppleScript's text item delimiters to ") "
				set t to name as string
				if (count t's text items) > 1 then
					set t to t's text items
					set t to items 2 thru -1 of t
					set name to t as string
				end if
				set AppleScript's text item delimiters to tid
			end tell
		end repeat
	end tell
end tell