Pagesetup returns 9999999 for margins

P

Peter

Hello,

I'm trying to copy the margin information from one document to another. If I
open the pagesetup dialog box, everything seems normal but if I use the
following code (whether in a macro or in the immediate window) the values
returned are 999999 seemingly at random. This does not happen for all the
margins. For example, topmargin might (returns 72 as expected) be ok and
bottommargin will return 9999999. Anyone have any ideas what is going on here?

Thanks,
Peter
 
T

Tony Jollans

You don't post your code so I don't know exactly what you are doing, but
999999 is a code that means that the property you are querying is not the
same across the whole range you are querying it. Are you perhaps querying
margins for the whole document when you have multiple sections with
different margins?
 
P

Peter

Yes thank you. I was using pagesetup on the document. I switched to
section.pagesetup and then everything was fine.

Thanks again.
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top