Finding end of document

R

rlampky

I have a multipage document that will grow from an initial userform to a
narrative area. I want to insert a form at the end of the document using an
autotext macro. The problem I have is how do I tell word were the end of the
document is, insert a section/page break so the page numbering does not
include the inserted page?

I am trying to reference several fields in the initial form so that users do
not need to retype the same information again.
 
D

Doug Robbins - Word MVP

Dim myrange as Range
Set myrange = ActiveDocument.Range
myrange.Collapse wdCollapseEnd

myrange is now the end of the document.

Or use

ActiveDocument.Range.InsertAfter

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
R

rlampky

Thank you sir, I will give it a try


Doug Robbins - Word MVP said:
Dim myrange as Range
Set myrange = ActiveDocument.Range
myrange.Collapse wdCollapseEnd

myrange is now the end of the document.

Or use

ActiveDocument.Range.InsertAfter

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
"rlampky" <> wrote in message news:%[email protected]...
 

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