Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: Updating Document Properties in lots of headers and footers

Geek News

Updating Document Properties in lots of headers and footers
EPA 6/28/2007 11:06:01 AM
(Word 2003 on Windows XP) If you have many sections, all with different
first page, different odd and even, you can have three headers and three
footers to update for each section whenever you change a document property
(e.g. security classification) that is referenced in all of the footers (no,
I don't want it like that, but someone else "in authority" does). Is there
an easy way to update all of these, without actually printing the document?
I'd like it to be automatic: I've seen plenty of cases where people have
forgotten to update both the odd and the even footer, even when there's only
one section in a document. I've seen the exchange between Nuzza and Lene in
Feb/Mar this year, but I don't know enough about VBA to determine whether the
UpdateAll code does what I want.
--
Ted
Re: Updating Document Properties in lots of headers and footers
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 6/28/2007 2:38:05 PM
Without digging back through the archives, I don't know which code you are
referring to, but the sample macro at
http://www.gmayor.com/installing_macro.htm should update the document
including all the headers and footers.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

EPA wrote:
[Quoted Text]
> (Word 2003 on Windows XP) If you have many sections, all with
> different first page, different odd and even, you can have three
> headers and three footers to update for each section whenever you
> change a document property (e.g. security classification) that is
> referenced in all of the footers (no, I don't want it like that, but
> someone else "in authority" does). Is there an easy way to update
> all of these, without actually printing the document? I'd like it to
> be automatic: I've seen plenty of cases where people have forgotten
> to update both the odd and the even footer, even when there's only
> one section in a document. I've seen the exchange between Nuzza and
> Lene in Feb/Mar this year, but I don't know enough about VBA to
> determine whether the UpdateAll code does what I want.


Re: Updating Document Properties in lots of headers and footers
"Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> 6/28/2007 4:55:42 PM
It should. In the past I've never been sure about fields in shapes within
headers and footers etc. but another experiment suggests it's OK after all.
You can "simplify" the code of UpdateAll marginally to

Sub UpdateAllFields()
Dim objRange As Word.Range
For Each objRange In ActiveDocument.StoryRanges
Do
objRange.Fields.Update
Set objRange = objRange.NextStoryRange
Loop Until objRange Is Nothing
Next
End Sub

Peter Jamieson
"EPA" <EPA[ at ]discussions.microsoft.com> wrote in message
news:676E00C5-EE20-4ACA-AB8D-E4437393E557[ at ]microsoft.com...
[Quoted Text]
> (Word 2003 on Windows XP) If you have many sections, all with different
> first page, different odd and even, you can have three headers and three
> footers to update for each section whenever you change a document property
> (e.g. security classification) that is referenced in all of the footers
> (no,
> I don't want it like that, but someone else "in authority" does). Is
> there
> an easy way to update all of these, without actually printing the
> document?
> I'd like it to be automatic: I've seen plenty of cases where people have
> forgotten to update both the odd and the even footer, even when there's
> only
> one section in a document. I've seen the exchange between Nuzza and Lene
> in
> Feb/Mar this year, but I don't know enough about VBA to determine whether
> the
> UpdateAll code does what I want.
> --
> Ted

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net