Copying without using clipboard 
Author Message
 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  
 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  
 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  
 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  
 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  
 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  
 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  
 
 [ 7 post ] 

 Relevant Pages 

1. Copying Metafiles to clipboard without using apigid32.dll

2. Copying DBGrid contents to clipboard (Or copying a table from a Data component to clipboard)

3. copy text from word to clipboard WITHOUT the format

4. using vba to copy to clipboard

5. Copy to clipboard using VBA

6. copying text to the windows clipboard using DHTML

7. File copy using clipboard

8. Copying to Clipboard using API calls

9. copy to clipboard using vbscript

10. Copy To Clipboard using MSFlexGrid

11. Copy to Clipboard using API Calls

12. Copy FaceID to Clipoard Without Using CommandBar References

 

 
Powered by phpBB® Forum Software