View Single Post
 
Old 01-16-2014, 04:03 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,950
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi thedr9wningman,

For your address data and logos, you could probably get away with using just a single document property (e.g. the 'Office' property), coupled with INCLUDETEXT and, perhaps, INCLUDEPICTURE fields that reference the fuller details in external files. This would be much easier to code & maintain than putting it all into a macro. The INCLUDETEXT field would reference either a separate file for each location or a nominated bookmark within a common file shared by all locations. The code to update both the document property and the corresponding logo & address would then be as simple as;
Code:
Sub Demo()
With ActiveDocument
  .CustomDocumentProperties("Office").Text = InputBox("What is your Office location?", "Home Base")
  .Fields.Update
  .Fields.Unlink
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote