View Single Post
  #2   Report Post  
Posted to microsoft.public.word.pagelayout
Shauna Kelly Shauna Kelly is offline
external usenet poster
 
Posts: 571
Default Changing Margins in multiple documents

Hi Julie

No, there's no way to do it without opening each document. But you can
automate that. If all the documents are in one folder, use code like the
code at http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm

I haven't tested this, but I think the only modifications to that code that
you would need would be the following:

Delete the following:
'Display dialog on first loop only

Dialogs(wdDialogEditReplace).Show

and replace it with the following (change the 3 to suit the margin you want)

myDoc.Sections(1).PageSetup.TopMargin = centimetrestopoints(3)


And, delete this too:
With Dialogs(wdDialogEditReplace)
.ReplaceAll = 1
.Execute
End With

and replace it with the following (change the 3 to suit the margin you want)

myDoc.Sections(1).PageSetup.TopMargin = centimetrestopoints(3)


Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


"Julie S" wrote in message
...
I have 100+ 1-page Word documents for which I have to change the right
margin. Is there a way to do this without having to open each and every
document? I'm using Word 2003-SP2.
--
Thanks,
Julie