![]() |
#6
|
||||
|
||||
![]()
In that case, if you run the macro from a document containing the required header, you could simply delete:
Code:
StrTxt = InputBox("Text to add to headers? e.g. ""March 1, 2018""") If Trim(StrTxt) = "" Then Exit Sub .Sections(1).Headers(wdHeaderFooterPrimary).Range. InsertAfter StrTxt to: Code:
With .Sections(1).Headers(wdHeaderFooterPrimary).Range .FormattedText = wdDocSrc.Sections(1).Headers(wdHeaderFooterPrimary).Range.FormattedText .Characters.Last.Delete End With
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word 2016 Multi-file Macro issues | IneedHelpWithWord | Word VBA | 1 | 08-08-2017 09:29 PM |
![]() |
DrDress | Word | 4 | 04-17-2017 06:39 PM |
![]() |
aaronbauer1980 | Excel Programming | 1 | 04-15-2016 05:53 PM |
![]() |
BriMan83 | Mail Merge | 1 | 04-24-2013 11:35 PM |
![]() |
Evgeniy | Word | 1 | 02-04-2012 01:36 PM |