#1
|
|||
|
|||
Word 2007 Clipboard use
In Help for using the Clipboard in a Word Macro the examples all show "Dim XXX as DataObject". When I try to use that in a macro I get "Compile error: User-defined type not defined". The Help for "DataObject" isn't much use. I used to use the Clipboard a lot, but changes in Word caused me to back out all that code. I'd really like to use the Clipboard but can't seem to get it working! Any help? |
#2
|
||||
|
||||
You are missing a reference to the Microsoft Forms 2.0 Object Library
See Paste clipboard contents using VBA
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Guessed: Don't understand your response. Although I specified I'm using Word 2007 you responded with suggestions not available on my system (Windows 7) - "C:\Windows\System32\FM20.dll or C:\Windows\FM20.dll" and the display of the References popup from Visual Basic, showing that you're using a much more recent version. I could not find "the Word object model library" on my system. I've got win10 and Office 2016 on another computer, but until MS makes Win7 as slow as Win10 (they're getting there quickly!) I'll continue to use Win7 for my work. Meanwhile... Can anybody provide me with the VBA code in Office 2007 to use the Clipboard? I used to use the Clipboard in Word, EXCEL, and VB but MS updates invalidated that code without any hints on how to advance. The HELP suggestions are useless.
|
#4
|
||||
|
||||
What happens if you add a vba userform to the file - this should add the correct reference. Does a new reference appear in your list?
Version 2 of this dll looks like it existed prior to 2004 so I consider my advice to be relevant to your Office 2007 machine. Putting Text Into the Windows Clipboard – Daily Dose of Excel
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to get rid of annoying clipboard message on Word exit? | eduzs | Word VBA | 0 | 12-18-2020 07:08 AM |
Error with Clipboard - Getting Spaces Out of Clipboard | StephenRay | Word VBA | 14 | 09-27-2017 01:07 PM |
Exiting Word 2013 with data on clipboard | ScottVD | Word | 1 | 06-07-2014 02:59 PM |
office 2007 clipboard - options & source formatting | jeffk | Word | 3 | 08-28-2012 02:25 AM |
Pasting image captured with a java program 'on to clipboard' into MSWord 2007 is blur | tarunkumarreddy | Word | 0 | 02-03-2012 09:42 PM |