VBA Script in AppleScript
VBA Script in AppleScript
- Subject: VBA Script in AppleScript
- From: Dave <email@hidden>
- Date: Thu, 14 May 2015 12:54:24 +0100
Hi,
I’ve found a VBA Script that does more or less what I want. I’ve converted most of it, but I’m stumped on the syntax for the following:
Dim primaryHeader As Word.HeaderFooter
Dim firstPageHeader As Word.HeaderFooter
Dim range As Word.range
Dim fields As Word.fields
Dim field As Word.fields
Dim customDocProps As Office.DocumentProperties
Dim primaryHeaderDocProp As Office.DocumentProperty
'Get the Fields of the 'Primary Header'
Set fields = ActiveDocument.Sections.First.Headers.Item(wdHeaderFooterPrimary).range.fields
'Add a field that references the 'PrimaryHeader' custom document property
fields.Add(ActiveDocument.Sections.First.Headers.Item(wdHeaderFooterPrimary).range, WdFieldType.wdFieldEmpty, "DOCPROPERTY PrimaryHeaderDocProp", True).Update
'Get the Fields of the 'First Page Header'
Set fields = ActiveDocument.Sections.First.Headers.Item(wdHeaderFooterFirstPage).range.fields
Can anyone tell me the equivalent in Applescript Please?
All the Best
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden