paste at end of document

  • Thread starter david epsom dot com dot au
  • Start date
D

david epsom dot com dot au

If I use this line
wrdDoc.content.PASTE

then the text I have copied is pasted over the content of the document.
(wrdDoc is a document object and Content is the range object).

What I want to do is to move to the end of the document, and then paste
there. I guess it may involve creating a new range at the end of the
document.

Can anyone show me how?

(david)
 
C

Cindy Meister -WordMVP-

Hi David,

This would work:
Dim rng as Word.range
Set rng = wrdDoc.Range
rng.Collapse wdCollapseEnd
rng.Paste

Another approach would be to use EndKey to go to the end of the document,
then Selection.Paste
If I use this line
wrdDoc.content.PASTE

then the text I have copied is pasted over the content of the document.
(wrdDoc is a document object and Content is the range object).

What I want to do is to move to the end of the document, and then paste
there. I guess it may involve creating a new range at the end of the
document.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

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

david epsom dot com dot au

Thank you. This is part of a project moving from Word.Basic to
Word.application.

Oddly enough, in the last 6 months the Word.Basic (for the
first time since it was written circa 1994) has been working
without loading or shutdown problems: Client can now do runs
of around 1000 pages with the Word.Basic code. Dunno if it's
Word or Windows or the hardware that has changed, but I
guess if it's working, it must be time to fix it..... :~)

regards
(david)
 
C

Cindy Meister -WordMVP-

Hi David,
Oddly enough, in the last 6 months the Word.Basic (for the
first time since it was written circa 1994) has been working
without loading or shutdown problems: Client can now do runs
of around 1000 pages with the Word.Basic code. Dunno if it's
Word or Windows or the hardware that has changed, but I
guess if it's working, it must be time to fix it..... :~)
<LOL> With newer versions of Word/Windows? Hard to guess
without knowing what all it's doing, but I'd guess that some
of those notorious memory leaks have been plugged...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan
24 2003)
http://www.mvps.org/word

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