View Single Post
 
Old 01-12-2015, 01:05 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

If 'title' is the name of your textbox (not merely some text in it), should be using code like:
ActiveDocument.Shapes("title").TextFrame.TextRange .Text = "Some Text"
As for replicating the content in the page header, headers don't have textframe.textrange properties; they have a range property, just like the body of the document - but you also have to specify which header to work with. In any event, you don't need a macro for that, all you need do is assign a unique Style name to your 'title' textbox and use a STYELREF field in the header to reference that Style.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote