Re: Word: Landscape Headers - SUMMARY and THANK YOU

Subject: Re: Word: Landscape Headers - SUMMARY and THANK YOU
From: Mark Magennis <markmagennis -at- YAHOO -dot- COM>
Date: Fri, 16 Apr 1999 09:08:18 -0700

> Caveats: Word doesn't like field codes in the text box; therefore, no
> auto-numbering! And you can't copy and paste a text box, so you have to
> draw a new one for each header and footer on each page.

Not true. I routinely use text boxes containing field codes and I can cut and paste
them no problem. I use Word97.

It is true that you have to update the fields in text boxes separately. This is
because when you do a Select All, the text inside text boxes is not selected, so
update Fields will not update them along with the rest.

However, you can write a macro to update the text AND the text boxes (I'll include
one below). You could then add the macro to a menu, create a toolbar button or a
keyboard shortcut for it. If you don't know how to do this, mail me and I'll talk
you through it. It's not that difficult when you know how and once you've tried it
once you'll be creating toolbar buttons and menu items all over the place. It really
impresses co-workers too ;-)

Something like this macro should work:

-------------------------------
'First update the fields in the text...
Selection.WholeStory
Selection.Fields.Update

...then the fields in the text boxes...
For Each aShape In ActiveDocument.Shapes
If aShape.Type = msoTextBox Then
For Each aField In aShape.TextFrame.TextRange.Fields
aField.Update
Next aField
End If
Next aShape

'...and not forgetting the fields in the headers and footers
For Each aSection In ActiveDocument.Sections
aSection.Headers(wdHeaderFooterPrimary).Range.Select
If Selection.Fields.Count >= 1 Then
Selection.Fields.Update
End If
ActiveWindow.ActivePane.Close
Next aSection
---------------------------------

I think this will work but I haven't tried it out. I just cobbled it together from
bits of macros that do other things. If not, I'd be happy to make one that does work
for you. Just mail me.

Mark

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

From ??? -at- ??? Sun Jan 00 00:00:00 0000=




Previous by Author: re N -at- ming symbols? Just s -at- y no!
Next by Author: Re: Software Demo Tools
Previous by Thread: Word: Landscape Headers - SUMMARY and THANK YOU
Next by Thread: Some Advice Needed


What this post helpful? Share it with friends and colleagues:


Sponsored Ads