Copy and Paste a short paragraph

S

Steve Frye

When I try to copy a paragraph into the text of the document, I get an extra
carraige return which I don't want. The code I am using is:

Set aRange = ActiveDocument.Paragraphs(9).Range
ActiveDocument.Bookmarks("PlaceHolder").Range.Text = aRange

How can I make it so the paragraph just gets inserted and the rest of the
text continues normally?
(Is there a better way to do it than what I'm trying?)


Thanks
Steve
 
J

Jonathan West

Steve Frye said:
When I try to copy a paragraph into the text of the document, I get an extra
carraige return which I don't want. The code I am using is:

Set aRange = ActiveDocument.Paragraphs(9).Range
ActiveDocument.Bookmarks("PlaceHolder").Range.Text = aRange

How can I make it so the paragraph just gets inserted and the rest of the
text continues normally?
(Is there a better way to do it than what I'm trying?)

Try this

Set aRange = ActiveDocument.Paragraphs(9).Range
aRange.MoveEnd Unit:=wdCharacter, Count:=-1
ActiveDocument.Bookmarks("PlaceHolder").Range.Text = aRange
 
S

Steve Frye

Works wonderful!
Thanks


Jonathan West said:
Try this

Set aRange = ActiveDocument.Paragraphs(9).Range
aRange.MoveEnd Unit:=wdCharacter, Count:=-1
ActiveDocument.Bookmarks("PlaceHolder").Range.Text = aRange

--
Regards
Jonathan West - Word MVP
http://www.multilinker.com
Please reply to the newsgroup
 

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