Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Word Footer

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,62905
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Word Footer
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Word Footer - 7/29/2008 8:21:21 AM   
  jbrek

 

Posts: 1
Score: 0
Joined: 7/29/2008
Status: offline
the Script  adds a footer to a new word document.  I am try to put Last Save Date and Filename in the footer.  No matter what i try the second WDfield always overwrite the first one.  What must i do to add 
multiply WDfields to a footer.


Const wdFieldFileName = 29
Const wdFieldSaveDate = 22
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()

objDoc.Fields.Add objDoc.Sections(1).footers(1).Range, wdFieldSaveDate
objDoc.Sections(1).footers(1).Range.ParagraphFormat.Alignment = 1

objDoc.Fields.Add objDoc.Sections(1).footer(1).Range, wdFieldFileName
objDoc.Sections(1).footer(1).Range.ParagraphFormat.Alignment = 2


 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Word Footer Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts