• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
VBA Script in AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Spurious Messages from "email@hidden”
  • Next by Date: Re: Spurious Messages from "email@hidden”
  • Previous by thread: Re: Spurious Messages from "email@hidden”
  • Next by thread: Calendar events & attachements
  • Index(es):
    • Date
    • Thread