Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.pagelayout
DGaskin DGaskin is offline
external usenet poster
 
Posts: 2
Default MS Word Headers-Footers

Using MS Word 2007: In selecting file names as part of the header, how do I
create automatic updates for that field (filename) so that if I change the
name of the file (while it is closed), it will automatically reflect the
update in the header the next time the file is opened?
  #2   Report Post  
Posted to microsoft.public.word.pagelayout
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default MS Word Headers-Footers

You would need an autoopen macro in an add-in that updated the fields in the
..Range of the header.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"DGaskin" wrote in message
...
Using MS Word 2007: In selecting file names as part of the header, how do
I
create automatic updates for that field (filename) so that if I change the
name of the file (while it is closed), it will automatically reflect the
update in the header the next time the file is opened?



  #3   Report Post  
Posted to microsoft.public.word.pagelayout
DGaskin DGaskin is offline
external usenet poster
 
Posts: 2
Default MS Word Headers-Footers

Any resource that you could suggest that I could use to build an "autoopen
macro"? Or is it something that is already available in an existing add-in?

-David


"Doug Robbins - Word MVP" wrote:

You would need an autoopen macro in an add-in that updated the fields in the
..Range of the header.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"DGaskin" wrote in message
...
Using MS Word 2007: In selecting file names as part of the header, how do
I
create automatic updates for that field (filename) so that if I change the
name of the file (while it is closed), it will automatically reflect the
update in the header the next time the file is opened?




  #4   Report Post  
Posted to microsoft.public.word.pagelayout
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default MS Word Headers-Footers

The following is the code that you would need:

Sub autoopen()
Dim i As Long, j As Long
With ActiveDocument
For i = 1 To .Sections.Count
With .Sections(i)
For j = 1 To .Headers.Count
.Headers(j).Range.Fields.Update
Next j
End With
Next i
End With
End Sub

See the article "What do I do with macros sent to me by other newsgroup
readers to help me out?" at:

http://www.word.mvps.org/FAQs/Macros...eateAMacro.htm

The macro should be stored in the Normal.Dot template
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"DGaskin" wrote in message
...
Any resource that you could suggest that I could use to build an "autoopen
macro"? Or is it something that is already available in an existing
add-in?

-David


"Doug Robbins - Word MVP" wrote:

You would need an autoopen macro in an add-in that updated the fields in
the
..Range of the header.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"DGaskin" wrote in message
...
Using MS Word 2007: In selecting file names as part of the header, how
do
I
create automatic updates for that field (filename) so that if I change
the
name of the file (while it is closed), it will automatically reflect
the
update in the header the next time the file is opened?






Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Headers/footers in 2007 word Nita M. Microsoft Word Help 1 March 4th 08 07:13 PM
Headers and Footers in Word 2003 Marilyn Microsoft Word Help 4 November 8th 06 04:31 PM
Word 2007 Headers and Footers videoman Microsoft Word Help 4 June 30th 06 02:59 PM
Word, Sections, and Headers/Footers Crush T Velour New Users 1 September 5th 05 04:39 PM
MS Word XP - Headers and Footers Viswanath Microsoft Word Help 1 April 13th 05 11:09 AM


All times are GMT +1. The time now is 02:57 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"