PageSetup.SectionStart

C

Connie Lee

Hi,

Do you know why I would get activeDocument.pagesetup.sectionstart = 9999999?

I needed to set PageSetup.SectionStart = wdSectionContinuous but the
PageSetup.SectionStart = 9999999 created "Value out of range" error.

Thank You!

Connie
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?Q29ubmllIExlZQ==?=,
Do you know why I would get activeDocument.pagesetup.sectionstart = 9999999?

I needed to set PageSetup.SectionStart = wdSectionContinuous but the
PageSetup.SectionStart = 9999999 created "Value out of range" error.
How are you trying to use it? As a property of which object? If you're using
the Document object, try narrowing it down to the specific section, instead.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
C

Connie Lee

Thanks for replay!

Yes, I am using the document object. Could you be more specific about the
narrowing the specific section?

In my code, I am coping paragraphs of info from serveral temp doc into a
main doc. In the main doc, I am trying to tell it to paste it following the
previous paragraph, instead of starting a new page.

Thanks, Connie
 
C

Cindy M -WordMVP-

Hi Connie,
Yes, I am using the document object. Could you be more specific about the
narrowing the specific section?

In my code, I am coping paragraphs of info from serveral temp doc into a
main doc. In the main doc, I am trying to tell it to paste it following the
previous paragraph, instead of starting a new page.
Are you familiar with working with ranges? And the Range.FormattedText
property? That should be more efficient that using copy/paste...

If a document contains more than one section, then you can retrieve a
particular section and query the pageSetup properties through that. It's
difficult to give you a meaningful example without knowing how you're
identifying "the previous paragraph". But assuming you're working with a range
that's actually within the section...

range.Sections(1)

will return the section within which the range stands. So

range.Sections(1).PageSetup

returns the information for that particular section. This is more reliable than
trying to use document.PageSetup, as settings can vary between sections (the
999999 value = indeterminate).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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