
Moving text from Doc to Doc
Hi Jason,
Define a variable to represent each document and also a range to represent
the data being copied
Dim Source as Document, Target as Document, myrange as range
Then set the variables to the respective documents
Set Source =
Set Target =
Then set the range to be copied
Set myrange=Source.Paragraphs(n).Range
myrange.end=myrange.end -1
Target.Range.InsertAfter myrange
Please post any response to the newsgroups for the benefit of others who may
also be following the thread.
Hope this helps,
Doug Robbins - Word MVP
Quote:
> I would like to move only the text of a paragraph
> (purposely not including the paragraph mark) from one
> document to another. I would like to retain all character
> formatting and all contents (including pics, charts, etc.)
> but not the paragraph mark.
> I currently have a macro that creates a range of just the
> text minus the paragraph mark, copies it, switches windows
> and then pastes it. I'm wondering if there is a way to
> move the paragraph contents without having to switch
> windows.
> The macro would have to keep track of the documents,
> create a new paragraph in the target document for each
> paragraph content that it copies from the original
> document.
> Anyone have any ideas? thanks.