A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Microsoft Word Help
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How do I get the filename to auto-update in the header?



 
 
Thread Tools Display Modes
  #1  
Old October 27th 05, 10:23 PM
Ian M. Walker
external usenet poster
 
Posts: n/a
Default How do I get the filename to auto-update in the header?

I can put the filename into headers via the "insert" and "field" menus but
these do not auto-update. The help suggests using the options on the header
and footer menu for auto-updates but for some reason filename is not an
option for me in Word 2003. I'm convinced that I used to use that in my
footers all the time so I don't know why it would be missing in this latest
version. Also, the first menu in headers and footers "Insert auto-text" is
greyed out.

Can anybody help me with the auto-updating of filenames in my header and
also explain why this is missing from the headers and footers menu?

Thank you.

Office 2003 with Windows XP SP2

Ads
  #2  
Old October 27th 05, 10:33 PM
garfield-n-odie
external usenet poster
 
Posts: n/a
Default How do I get the filename to auto-update in the header?

See http://support.microsoft.com/?kbid=832897 "The FILENAME field
does not automatically update when you open a document in Word
2002 or Word 2003".

As for why the Insert AutoText option is grayed out in the Header
and Footer toolbar, this is usually caused by overwriting the
Normal.dot global template with a regular Word document. Try
renaming Normal.dot as described in
http://word.mvps.org/FAQs/AppErrors/...ocNotBlank.htm .

Ian M. Walker wrote:

I can put the filename into headers via the "insert" and "field" menus but
these do not auto-update. The help suggests using the options on the header
and footer menu for auto-updates but for some reason filename is not an
option for me in Word 2003. I'm convinced that I used to use that in my
footers all the time so I don't know why it would be missing in this latest
version. Also, the first menu in headers and footers "Insert auto-text" is
greyed out.

Can anybody help me with the auto-updating of filenames in my header and
also explain why this is missing from the headers and footers menu?

Thank you.

Office 2003 with Windows XP SP2


  #3  
Old October 27th 05, 11:13 PM
Ian M. Walker
external usenet poster
 
Posts: n/a
Default How do I get the filename to auto-update in the header?



"garfield-n-odie" wrote:

See http://support.microsoft.com/?kbid=832897 "The FILENAME field
does not automatically update when you open a document in Word
2002 or Word 2003".

As for why the Insert AutoText option is grayed out in the Header
and Footer toolbar, this is usually caused by overwriting the
Normal.dot global template with a regular Word document. Try
renaming Normal.dot as described in
http://word.mvps.org/FAQs/AppErrors/...ocNotBlank.htm .

Ian M. Walker wrote:

I can put the filename into headers via the "insert" and "field" menus but
these do not auto-update. The help suggests using the options on the header
and footer menu for auto-updates but for some reason filename is not an
option for me in Word 2003. I'm convinced that I used to use that in my
footers all the time so I don't know why it would be missing in this latest
version. Also, the first menu in headers and footers "Insert auto-text" is
greyed out.

Can anybody help me with the auto-updating of filenames in my header and
also explain why this is missing from the headers and footers menu?

Thank you.

Office 2003 with Windows XP SP2



First of all, thank you very much for taking the time to offer assistance
and point to the documents.

The first response was very interesting and I followed the steps to create
the macro for auto-updating. Unfortunately, I discovered that just as when
you use "select all" and "f9" to update fields, the macro does not include
headers and footers. Do you know enough about visual basic to change that
please?

As for the second part, if I re-create/re-name, etc. my Normal.dot is there
a way to export my current macros to it as I have a fair few for some
technical documents I write.

Thank you again.
  #4  
Old October 28th 05, 02:19 AM
Jay Freedman
external usenet poster
 
Posts: n/a
Default How do I get the filename to auto-update in the header?

On Thu, 27 Oct 2005 15:13:03 -0700, "Ian M. Walker"
wrote:

"garfield-n-odie" wrote:

See http://support.microsoft.com/?kbid=832897 "The FILENAME field
does not automatically update when you open a document in Word
2002 or Word 2003".

As for why the Insert AutoText option is grayed out in the Header
and Footer toolbar, this is usually caused by overwriting the
Normal.dot global template with a regular Word document. Try
renaming Normal.dot as described in
http://word.mvps.org/FAQs/AppErrors/...ocNotBlank.htm .

Ian M. Walker wrote:

I can put the filename into headers via the "insert" and "field" menus but
these do not auto-update. The help suggests using the options on the header
and footer menu for auto-updates but for some reason filename is not an
option for me in Word 2003. I'm convinced that I used to use that in my
footers all the time so I don't know why it would be missing in this latest
version. Also, the first menu in headers and footers "Insert auto-text" is
greyed out.

Can anybody help me with the auto-updating of filenames in my header and
also explain why this is missing from the headers and footers menu?

Thank you.

Office 2003 with Windows XP SP2



First of all, thank you very much for taking the time to offer assistance
and point to the documents.

The first response was very interesting and I followed the steps to create
the macro for auto-updating. Unfortunately, I discovered that just as when
you use "select all" and "f9" to update fields, the macro does not include
headers and footers. Do you know enough about visual basic to change that
please?

As for the second part, if I re-create/re-name, etc. my Normal.dot is there
a way to export my current macros to it as I have a fair few for some
technical documents I write.

Thank you again.


Hi Ian,

For the updating of fields in the headers, the macro in the KB article
should work unless you have multiple sections with Same As Previous
turned off. A more comprehensive approach along the same lines is
based on the technique in
http://word.mvps.org/FAQs/MacrosVBA/...AllWithVBA.htm, like
this:

Sub UpdateAllFields()
Dim myStoryRange As Range

For Each myStoryRange In ActiveDocument.StoryRanges
myStoryRange.Fields.Update
Do While Not (myStoryRange.NextStoryRange Is Nothing)
Set myStoryRange = myStoryRange.NextStoryRange
myStoryRange.Fields.Update
Loop
Next myStoryRange
End Sub

A completely different approach is to make sure the "Update fields"
option in Tools Options Print is checked, and then switch the view
to Print Preview and back to Print Layout. As a macro, the code looks
like this:

Sub UpdateAllFields_2()
Dim oldOpt As Boolean

' save user's option, then set True
oldOpt = Options.UpdateFieldsAtPrint
Options.UpdateFieldsAtPrint = True

ActiveWindow.View = wdPrintPreview
ActiveWindow.View = wdPrintView

' restore user's option
Options.UpdateFieldsAtPrint = oldOpt
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
  #5  
Old November 2nd 05, 12:01 AM
Ian M. Walker
external usenet poster
 
Posts: n/a
Default How do I get the filename to auto-update in the header?



"Jay Freedman" wrote:

On Thu, 27 Oct 2005 15:13:03 -0700, "Ian M. Walker"
wrote:

"garfield-n-odie" wrote:

See http://support.microsoft.com/?kbid=832897 "The FILENAME field
does not automatically update when you open a document in Word
2002 or Word 2003".

As for why the Insert AutoText option is grayed out in the Header
and Footer toolbar, this is usually caused by overwriting the
Normal.dot global template with a regular Word document. Try
renaming Normal.dot as described in
http://word.mvps.org/FAQs/AppErrors/...ocNotBlank.htm .

Ian M. Walker wrote:

I can put the filename into headers via the "insert" and "field" menus but
these do not auto-update. The help suggests using the options on the header
and footer menu for auto-updates but for some reason filename is not an
option for me in Word 2003. I'm convinced that I used to use that in my
footers all the time so I don't know why it would be missing in this latest
version. Also, the first menu in headers and footers "Insert auto-text" is
greyed out.

Can anybody help me with the auto-updating of filenames in my header and
also explain why this is missing from the headers and footers menu?

Thank you.

Office 2003 with Windows XP SP2



First of all, thank you very much for taking the time to offer assistance
and point to the documents.

The first response was very interesting and I followed the steps to create
the macro for auto-updating. Unfortunately, I discovered that just as when
you use "select all" and "f9" to update fields, the macro does not include
headers and footers. Do you know enough about visual basic to change that
please?

As for the second part, if I re-create/re-name, etc. my Normal.dot is there
a way to export my current macros to it as I have a fair few for some
technical documents I write.

Thank you again.


Hi Ian,

For the updating of fields in the headers, the macro in the KB article
should work unless you have multiple sections with Same As Previous
turned off. A more comprehensive approach along the same lines is
based on the technique in
http://word.mvps.org/FAQs/MacrosVBA/...AllWithVBA.htm, like
this:

Sub UpdateAllFields()
Dim myStoryRange As Range

For Each myStoryRange In ActiveDocument.StoryRanges
myStoryRange.Fields.Update
Do While Not (myStoryRange.NextStoryRange Is Nothing)
Set myStoryRange = myStoryRange.NextStoryRange
myStoryRange.Fields.Update
Loop
Next myStoryRange
End Sub

A completely different approach is to make sure the "Update fields"
option in Tools Options Print is checked, and then switch the view
to Print Preview and back to Print Layout. As a macro, the code looks
like this:

Sub UpdateAllFields_2()
Dim oldOpt As Boolean

' save user's option, then set True
oldOpt = Options.UpdateFieldsAtPrint
Options.UpdateFieldsAtPrint = True

ActiveWindow.View = wdPrintPreview
ActiveWindow.View = wdPrintView

' restore user's option
Options.UpdateFieldsAtPrint = oldOpt
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org



I'm sorry it took a while to get back to you on this but thank you so much.
The print preview trick works just lovely.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do you auto update header and footer to doc title gina Microsoft Word Help 1 August 30th 05 02:50 AM
How do I get the filename to auto update? Nikkit72 Microsoft Word Help 10 May 6th 05 03:29 PM
Filename in topptext in normal.dot doesn´t update Mads Lillevold Microsoft Word Help 1 March 30th 05 03:25 PM
Word should auto update Formulas in the same way Excel does SmokeyMcPotHead Microsoft Word Help 3 February 26th 05 03:37 PM
Filename field in header - automatically update? Paul Kraemer Microsoft Word Help 1 February 9th 05 09:01 PM


All times are GMT +1. The time now is 07:06 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©2004-2014 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.