Copying without using clipboard
Author |
Message |
Rafael Cott #1 / 7
|
 Copying without using clipboard
Hi, all How do I get the selection (text, tables, etc) of an active document and then puts it in another (new) document without using the clipboard? This could be easy using clipboard, but this must be without clipboard because some programs (antivirus) do use it. Thanks, Rafael
|
Sat, 12 Jul 2003 03:43:12 GMT |
|
 |
Perr #2 / 7
|
 Copying without using clipboard
Hi Rafael, Why base a new document on the activedocument as 'template' ... This way, everything is copied ? Documents.Add ActiveDocument.FullName Note: active document needs to be saved beforehand Krgrds, Perry
Quote: > Hi, all > How do I get the selection (text, tables, etc) of an active document and > then puts it in another (new) document without using the clipboard? > This could be easy using clipboard, but this must be without clipboard > because some programs (antivirus) do use it. > Thanks, > Rafael
|
Sat, 12 Jul 2003 04:11:57 GMT |
|
 |
Perr #3 / 7
|
 Copying without using clipboard
Hi Rafael, Correction ** Why *NOT* base a new document on the activedocument as 'template' ... This way, everything is copied ? Documents.Add ActiveDocument.FullName Note: active document needs to be saved beforehand Krgrds, Perry
Quote: > Hi, all > How do I get the selection (text, tables, etc) of an active document and > then puts it in another (new) document without using the clipboard? > This could be easy using clipboard, but this must be without clipboard > because some programs (antivirus) do use it. > Thanks, > Rafael
|
Sat, 12 Jul 2003 04:13:06 GMT |
|
 |
Rafael Cott #4 / 7
|
 Copying without using clipboard
hi Perry But I don't want the hole document, just the selected (highlighted) portion of this. (sorry for my english) Rafael
Quote: > Hi Rafael, > Correction ** > Why *NOT* base a new document on the activedocument > as 'template' ... > This way, everything is copied ? > Documents.Add ActiveDocument.FullName > Note: active document needs to be saved beforehand > Krgrds, > Perry
> > Hi, all > > How do I get the selection (text, tables, etc) of an active document and > > then puts it in another (new) document without using the clipboard? > > This could be easy using clipboard, but this must be without clipboard > > because some programs (antivirus) do use it. > > Thanks, > > Rafael
|
Sat, 12 Jul 2003 19:45:45 GMT |
|
 |
Jonathan Wes #5 / 7
|
 Copying without using clipboard
Hi Rafael, Look up the FormattedText property in Word VBA Help. There are code samples there which will show you what to do. If you get stuck, post back here. -- Regards Jonathan West - Word MVP MultiLinker - Automated generation of hyperlinks in Word Conversion to PDF & HTML http://www.multilinker.com Word FAQs at http://www.multilinker.com/wordfaq Please post any follow-up in the newsgroup. I do not reply to Word questions by email
Quote: > hi Perry > But I don't want the hole document, just the selected (highlighted) portion > of this. > (sorry for my english) > Rafael
> > Hi Rafael, > > Correction ** > > Why *NOT* base a new document on the activedocument > > as 'template' ... > > This way, everything is copied ? > > Documents.Add ActiveDocument.FullName > > Note: active document needs to be saved beforehand > > Krgrds, > > Perry
> > > Hi, all > > > How do I get the selection (text, tables, etc) of an active document and > > > then puts it in another (new) document without using the clipboard? > > > This could be easy using clipboard, but this must be without clipboard > > > because some programs (antivirus) do use it. > > > Thanks, > > > Rafael
|
Sat, 12 Jul 2003 20:47:55 GMT |
|
 |
ibby #6 / 7
|
 Copying without using clipboard
Hi Rafael, Use the FormattedText property: --------------------------------------------------- Dim oDocNew As Document Dim oRange As Range Set oRange = Selection.FormattedText Set oDocNew = Documents.Add oDocNew.Range.FormattedText = oRange --------------------------------------------------- Hope this helps. ibby Please post replies or follow-ups to the **newsgroup** so that participants may benefit or contribute.
Quote: > Hi, all > How do I get the selection (text, tables, etc) of an active document and > then puts it in another (new) document without using the clipboard? > This could be easy using clipboard, but this must be without clipboard > because some programs (antivirus) do use it. > Thanks, > Rafael
|
Sat, 12 Jul 2003 21:03:11 GMT |
|
 |
Rafael Cott #7 / 7
|
 Copying without using clipboard
That's just what I wanted. Thanks a lot! Rafael
Quote: > Hi Rafael, > Use the FormattedText property: > --------------------------------------------------- > Dim oDocNew As Document > Dim oRange As Range > Set oRange = Selection.FormattedText > Set oDocNew = Documents.Add > oDocNew.Range.FormattedText = oRange > --------------------------------------------------- > Hope this helps. > ibby > Please post replies or follow-ups to the **newsgroup** so that participants > may benefit or contribute.
> > Hi, all > > How do I get the selection (text, tables, etc) of an active document and > > then puts it in another (new) document without using the clipboard? > > This could be easy using clipboard, but this must be without clipboard > > because some programs (antivirus) do use it. > > Thanks, > > Rafael
|
Sat, 12 Jul 2003 22:19:03 GMT |
|
|
|