Re: Page setup



Fuzzhead,
I would probably open the page setup while a bad document is loaded and if
any values are different than what was recorded with a good document active,
try to change those to match what the good document values had. If the
'good' values work by entering them manually, then I am at a loss why a
macro works for some documents, but not for others. Are you working with
English language documents? Maybe the text is anchored and the page can't be
made smaller, once set?

Russ,

This did not work. I still get the error message. Also I am not the only one
that is correcting the documents and we are all connected to different
printers. I think I just need to tell all the others that we will have to do
the page setup manually.

Fuzzhead


"Russ" wrote:

FuzzHead,

Record the Page Setup in a macro while the good document is open and the bad
document is not open. For instance, temporarily change a number, but then
set it back to its original value and then close out the Page Setup dialog
and stop the recording. If you now run that new macro, there should be no
error message.
If there is no error message, then open the bad document and run the new
macro and it should change the bad document's setting so that it falls
within the boundaries of your current default printer. If everything is OK
and you are happy then resave that bad document in order to turn it into a
good document.

In order to find out what the current limits are; according to your default
printer, you can experiment by making changes in the margins and looking at
a document that is loaded with text in print preview. Back off on the
numbers when the text gets chopped off in print preview. When everything is
set to the largest page size within the margins, then record another macro
for the page settings and name it Maximum_Page_Setting to run it on other
documents as a known starting point. Then you would know that you could not
set the page larger, but you have the option to set part of the page
smaller.
This should work unless you connect to a different printer, whose limits
might be different.
Let us know if this solves your problem.

Hi Russ,

I think thats what is happening. I can open one document and the macro runs
fine. I open the next document and I get the error. I went into print
preview
on the one I get the error message and it looks like part of the text is
running off the page. Is there a way to fix this?



"Russ" wrote:

Clarification inline.

Hey FuzzHead,
Just a guess on my part.
Maybe Word will happily record your current settings in the macro, but
when
you run it, your current **printer setup** is also looked at during Page
Setup setup changes and if they disagree, you get the 'Value out of range'
message. You sometimes can see the results of this if you got a document
loaded with text and you go into Print Preview and parts of your header or
footer or main body of text is chopped off. Word looks at your current
'default' printer device driver code to determine what is a 'Page' size.
I should have said "what is a 'Page' size limit."
That's why the term 'Page' is a unreliable quantity. When you connect to
another printer the amount on a 'Page' might be different.
Is that what is happening here?

I run the Record Macro to record my page setup. Below is what I get. But
when
I try to run it I get the following error: ŒValue out of Range¹. When I
debug it¹s at the following line in the macro: Œ.TopMargin =
InchesToPoints(0.75)¹. What is wrong with this macro?

With ActiveDocument.Styles(wdStyleNormal).Font
If .NameFarEast = .NameAscii Then
.NameAscii = ""
End If
.NameFarEast = ""
End With
With ActiveDocument.PageSetup
.Orientation = wdOrientPortrait
.TopMargin = InchesToPoints(0.75)
.BottomMargin = InchesToPoints(0.75)
.LeftMargin = InchesToPoints(0.8)
.RightMargin = InchesToPoints(0.8)
.HeaderDistance = InchesToPoints(0.75)
.FooterDistance = InchesToPoints(0.75)
.PageWidth = InchesToPoints(8.5)
.PageHeight = InchesToPoints(11)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = True
.MirrorMargins = False
.TwoPagesOnOne = False
.BookFoldPrinting = False
.BookFoldRevPrinting = False
.BookFoldPrintingSheets = 1
.GutterPos = wdGutterPosLeft
End With




--
Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID



--
Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID



--
Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

.