#1
|
|||
|
|||
Can other applications mess up Copy/Paste in Word VBA script?
Hi. I have a script that extracts tables from a series of documents and which takes a rather long time. The tables are extracted via .Copy and .PasteSpecial commands, and thus the clipboard is being used. However, once in a while, for no apparent reason, the script hangs and needs to be restarted, after which it works fine on exactly the same docs. Is it possible for other applications using the clipboard to mess each other up? For example, if I copy something in another application, will that mess up the clipboard contents as expected by my VBA script? Thanks~ |
#2
|
||||
|
||||
What is the destination? If it's another document, you could use the FormattedText property instead of Copy/Paste. See, for example:
https://www.msofficeforums.com/word-...row-paste.html You'll probably find FormattedText method rather quicker, too.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
@macropod
Thanks a lot! Using FormattedText indeed is much better, smarter, and much faster! Cheers to you~ |
Tags |
clipboard, ms word, vba |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Copy & Paste Word Doc from Excel VBA | RMerckling | Excel Programming | 4 | 04-18-2018 03:57 PM |
Word 2016 won't copy and paste | Dr. Becky | Word | 2 | 05-19-2017 04:59 PM |
Copy Text Twice to Paste into word | Albundy | Word | 2 | 09-02-2016 12:59 PM |
Cut, copy and paste - why so different from Microsoft Word? | mmp997 | OneNote | 1 | 10-30-2014 01:34 PM |
Word Copy Paste Problem... | haxmania1 | Word | 1 | 07-30-2009 06:49 AM |