Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.pagelayout
xppuser xppuser is offline
external usenet poster
 
Posts: 53
Default page setup to adjust margin without changing orientation

hi all,

office pro 2003 sp2, wxp pro sp2,

i am in a predicament. i have a large document (~200+ and increasing) with
multiple sections and pages with either potrait and landscape oritentation,
with margins set at 2.5 cm for the four sides on A4 paper. now what i found
out, for some reasons, some pages have 'Letter' paper and yet another has odd
margins (default or some others e.g. 2.2 cm instead of 2.5 cm) settings. i do
not how it happens but it has happened to me in the past but with much
smaller document where i can just format the whole document to A4, set the
required margins, put on potrait, after which manually re-orientated
landscape pages where required. this is not feasible with this project.

my question is: is there a way to set the whole document to A4 with margins
2.5 cm for the four sides while at the same time preserving the pages'
orientation.

any help and advice would be appreciated. thank you.

regards,
jes
  #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 page setup to adjust margin without changing orientation

The following macro should change all of the pages to A4 and set the margins
to 2.5cm without changing the orientation. BUT, just in case things go
wrong. SAVE THE DOCUMENT BEFORE RUNNING THE MACRO.

Dim i As Long, Ornum As Long
With ActiveDocument
For i = 1 To .Sections.Count
With .Sections(i).PageSetup
Ornum = .Orientation
.PaperSize = wdPaperA4
.TopMargin = CentimetersToPoints(2.5)
.BottomMargin = CentimetersToPoints(2.5)
.LeftMargin = CentimetersToPoints(2.5)
.RightMargin = CentimetersToPoints(2.5)
.Orientation = Ornum
End With
Next i
End With


--
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

"xppuser" wrote in message
...
hi all,

office pro 2003 sp2, wxp pro sp2,

i am in a predicament. i have a large document (~200+ and increasing) with
multiple sections and pages with either potrait and landscape
oritentation,
with margins set at 2.5 cm for the four sides on A4 paper. now what i
found
out, for some reasons, some pages have 'Letter' paper and yet another has
odd
margins (default or some others e.g. 2.2 cm instead of 2.5 cm) settings. i
do
not how it happens but it has happened to me in the past but with much
smaller document where i can just format the whole document to A4, set the
required margins, put on potrait, after which manually re-orientated
landscape pages where required. this is not feasible with this project.

my question is: is there a way to set the whole document to A4 with
margins
2.5 cm for the four sides while at the same time preserving the pages'
orientation.

any help and advice would be appreciated. thank you.

regards,
jes



  #3   Report Post  
Posted to microsoft.public.word.pagelayout
xppuser xppuser is offline
external usenet poster
 
Posts: 53
Default page setup to adjust margin without changing orientation

hi doug,

thank you for the codes. i would be grateful if you could tell me how to
deploy the macro. here are the first 2 sequence of steps that need to happen
(you'll need to guide me to the rest):

1. open the document that i want to apply the macro to
2. go to Tools - Macros or is it VB Editor? please guide me from here on

i have opened the macros option (if that is the right one), which i think i
have to give the macro you gave me a name, click on Create, and then i
presumed save it somewhere and click run. i have opened the VB Editor too
where it shows Project Pane (on the left) and a blank screen on the right.

i hope you would be able to help me rather than giving up on me for lack of
knowledge of macros/VB. i am willing to give this a try.

thanks,
jes

"Doug Robbins - Word MVP" wrote:

The following macro should change all of the pages to A4 and set the margins
to 2.5cm without changing the orientation. BUT, just in case things go
wrong. SAVE THE DOCUMENT BEFORE RUNNING THE MACRO.

Dim i As Long, Ornum As Long
With ActiveDocument
For i = 1 To .Sections.Count
With .Sections(i).PageSetup
Ornum = .Orientation
.PaperSize = wdPaperA4
.TopMargin = CentimetersToPoints(2.5)
.BottomMargin = CentimetersToPoints(2.5)
.LeftMargin = CentimetersToPoints(2.5)
.RightMargin = CentimetersToPoints(2.5)
.Orientation = Ornum
End With
Next i
End With


--
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

"xppuser" wrote in message
...
hi all,

office pro 2003 sp2, wxp pro sp2,

i am in a predicament. i have a large document (~200+ and increasing) with
multiple sections and pages with either potrait and landscape
oritentation,
with margins set at 2.5 cm for the four sides on A4 paper. now what i
found
out, for some reasons, some pages have 'Letter' paper and yet another has
odd
margins (default or some others e.g. 2.2 cm instead of 2.5 cm) settings. i
do
not how it happens but it has happened to me in the past but with much
smaller document where i can just format the whole document to A4, set the
required margins, put on potrait, after which manually re-orientated
landscape pages where required. this is not feasible with this project.

my question is: is there a way to set the whole document to A4 with
margins
2.5 cm for the four sides while at the same time preserving the pages'
orientation.

any help and advice would be appreciated. thank you.

regards,
jes




  #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 page setup to adjust margin without changing orientation

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


--
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

"xppuser" wrote in message
...
hi doug,

thank you for the codes. i would be grateful if you could tell me how to
deploy the macro. here are the first 2 sequence of steps that need to
happen
(you'll need to guide me to the rest):

1. open the document that i want to apply the macro to
2. go to Tools - Macros or is it VB Editor? please guide me from here on

i have opened the macros option (if that is the right one), which i think
i
have to give the macro you gave me a name, click on Create, and then i
presumed save it somewhere and click run. i have opened the VB Editor too
where it shows Project Pane (on the left) and a blank screen on the right.

i hope you would be able to help me rather than giving up on me for lack
of
knowledge of macros/VB. i am willing to give this a try.

thanks,
jes

"Doug Robbins - Word MVP" wrote:

The following macro should change all of the pages to A4 and set the
margins
to 2.5cm without changing the orientation. BUT, just in case things go
wrong. SAVE THE DOCUMENT BEFORE RUNNING THE MACRO.

Dim i As Long, Ornum As Long
With ActiveDocument
For i = 1 To .Sections.Count
With .Sections(i).PageSetup
Ornum = .Orientation
.PaperSize = wdPaperA4
.TopMargin = CentimetersToPoints(2.5)
.BottomMargin = CentimetersToPoints(2.5)
.LeftMargin = CentimetersToPoints(2.5)
.RightMargin = CentimetersToPoints(2.5)
.Orientation = Ornum
End With
Next i
End With


--
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

"xppuser" wrote in message
...
hi all,

office pro 2003 sp2, wxp pro sp2,

i am in a predicament. i have a large document (~200+ and increasing)
with
multiple sections and pages with either potrait and landscape
oritentation,
with margins set at 2.5 cm for the four sides on A4 paper. now what i
found
out, for some reasons, some pages have 'Letter' paper and yet another
has
odd
margins (default or some others e.g. 2.2 cm instead of 2.5 cm)
settings. i
do
not how it happens but it has happened to me in the past but with much
smaller document where i can just format the whole document to A4, set
the
required margins, put on potrait, after which manually re-orientated
landscape pages where required. this is not feasible with this project.

my question is: is there a way to set the whole document to A4 with
margins
2.5 cm for the four sides while at the same time preserving the pages'
orientation.

any help and advice would be appreciated. thank you.

regards,
jes






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
Duplex print functionality combined with Word's Page Setup Vinland Microsoft Word Help 1 June 22nd 06 04:07 PM
Want to start page 1 numbering after five pages - how? RM Page Layout 6 April 5th 06 05:07 AM
Header & Footer not on first page but on subsequent pages KM1 Microsoft Word Help 14 June 13th 05 12:36 AM
section breaks change each time opening document Dave Microsoft Word Help 6 March 21st 05 11:01 AM
FIrst page footers Noel S Pamfree Microsoft Word Help 7 December 6th 04 08:49 PM


All times are GMT +1. The time now is 10:17 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"