Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

obelixander

macrumors newbie
Original poster
Sep 15, 2010
1
0
I have the following procedure written in VBA for Word which I need to use in Word 2008 for Mac. Please bear with me as I've had a very basic first stab and know very little about Apple Script.

Sub descriptionRelativeMacro()

If Selection.Type = wdSelectionNormal Then

ActiveDocument.Indexes.MarkEntry Range:=Selection.Range, _

Entry:="D:" & Selection.Range.Text & "/" & Time() & "/-PPP/R/"

End If

End Sub

I've started to try and write that in Apple Script by writing this:

if selection type of selection is selection normal then mark for index active document range text object of selection ¬
entry "D:" & content of text object of selection & "/" & (current date) & "/-PPP/R/"
end if

but I get the following error message:

"Expected “then”, etc. but found identifier."

Can you help?

Many thanks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.