Thread: [Solved] VBA for Headings
View Single Post
 
Old 06-09-2015, 04:06 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
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

You would do better to format the client's name in a unique character or paragraph Style, then use a STYLEREF field in the header to refer to that Style. No code needed.

Are you sure the Section specified by ActiveDocument.Sections(i) exists when the code is run?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote