![]() |
#1
|
|||
|
|||
![]()
Hi All
I have several macros in my Word 2003 installation. I have been using them with no hitch on XP for years. Now I've transferred to a Win 7 Pro machine , I'm getting errors from my code and the macros are failing. This VBA , which I use to paste the content of the clipboard as unformatted text : Selection.PasteSpecial Link:=False, DataType:=wdPasteText, _ Placement:=wdInLine, DisplayAsIcon:=False now gives errors. I've tried various things to try to get this to work , with no success. It either gives an error , or if it does paste , it pastes the clipboard content in its formatted form , which is not what I need. Can sometime help with some code to paste the content of the clipboard as unformatted text? Grateful for any help. |
#2
|
||||
|
||||
![]()
Do you have FireFox installed?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Yes , I have Firefox installed. In fact I'm copying my text from there to paste into Word. Is that causing the issue , do you think?
Thanks for your help. |
#4
|
||||
|
||||
![]()
A recent FireFox update has apparently broken some aspect of the Windows clipboard. You could use a different browser, undo the most recent FireFox update or wait till the next one comes out.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
Hi
OK thanks for getting back. I would never have thought of that! I just opened the page I'm copying from in IE , and my Word macro ran perfectly! Copy from the same page in Firefox , and the macro gives errors. I've got the latest Firefox , so I guess I'll have to wait until they fix it in some new update. I'm sure they must be aware of it. Thanks again. At least I know that I don't need to re-write my macros. Best Wishes , |
#6
|
||||
|
||||
![]()
Interesting - and perhaps could explain the issue we have been discussing privately?
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#7
|
||||
|
||||
![]()
Might have some bearing, though I only found out about this yesterday and wouldn't have thought it likely to interfere with DataObjects & the PutInClipboard method. Still, worth exploring.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
![]()
I found a solution to this issue.
Instead of pasting text using Ctrl-V, you simply use Ctrl-Shift-V to do so. The difference between the options is that the latter pastes the text without formatting while the former retains it. You can also hold down Shift while using the mouse to paste contents in the browser as this works fine as well. |
#9
|
||||
|
||||
![]()
That's fine, but it doesn't resolve the issue of pasting with VBA, which is what your first post was concerned with.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#10
|
|||
|
|||
![]()
No , that's true. Pasting via VBA remains an issue.
|
#11
|
|||
|
|||
![]()
Ok I find this works :
Selection.PasteAndFormat (wdFormatPlainText) |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Ulodesk | Outlook | 1 | 07-03-2014 02:03 PM |
need a shortcut for paste special link unformatted text | noetic76 | Word VBA | 2 | 06-29-2014 06:40 PM |
![]() |
dwolnik | Outlook | 5 | 07-14-2011 11:27 AM |
![]() |
kenwpaul | Office | 2 | 02-25-2011 04:53 PM |
![]() |
Andacar | Word | 2 | 01-05-2011 09:15 PM |