VBA paste clipboard picture
by RkdN » Wed, 29 Mar 2006 01:46:05 GMT
Word 2002; windows 2000
Having a new document open and pressing a command button to run my VBA
command: it opens a master document and copies a picture of a signature off
the master document to the clipboard. It closes the master document and
returns the new document letter that I am writing. It pastes the signature
to the new letter.
The problem is that it does not paste it where my cursor is. It pastes it
at the top of the document. Is there something in my coding that would tell
it to paste it at the insertion point.
Thank you in advance...
Re: VBA paste clipboard picture
by Jezebel » Wed, 29 Mar 2006 14:55:08 GMT
Hard to say without seeing the code. Selection.Paste is normally what you
want. A simpler method is to define the signature image as an autotext entry
in the letter template.
Re: VBA paste clipboard picture
by RkdN » Wed, 29 Mar 2006 21:43:02 GMT
How do you define an image asan autotext entry?
Re: VBA paste clipboard picture
by Jezebel » Thu, 30 Mar 2006 06:51:21 GMT
Same way you define any other AutoText entry. Insert the image into a
document, select it, go to Insert > AutoText ...
Similar Threads:
1.Using VBA to load a picture and paste it to the clipboard
2.PPT How do I paste clipboard info to a specific location with VBA
I want paste specific ranges in an Excel spreadsheet to a
powerpoint slide at a specific location on the slide. I
have sucessfully pasted to a slide but I cannot figure out
how to position the pasted item where I want it.
3.Edit Picture (pasted from clipboard)
I've searched for an answer to this but the ones I've found don't
exactly work. Let's say I have an app that is set at 640x480. I want
to paste a screenshot into WinWord. So, I Alt-PrtScn when it's
active, and paste it into WinWord.
Now here's the problem. Let's say I want to extract the bitmap back
out, or just edit it a little with pixel resolution (i.e. get exactly
my same 640x480 back out). If I right click on it, the "Edit Picture"
button is disabled. Strangely enough, if the picture is very small,
the "Edit Picture" is enabled and launching it brings MS PaintBrush
(which is what I want for the bigger picture).
I'm guessing Microsoft is compressing larger images and making the
compression lossy.
I don't want lossy compression and I want to be able to edit the
original 640x480 painted image. As it is now, I can't get back out
the same quality of the image I put in. It's "lossy" (blah!).
Any ideas? Thanks.
4.Paste clipboard item to field through VBA?
Whoops! What a noobie's mistake that was! Thanks Dirk. I feel rather sheepish right now
I did find anotherissue, but I will take it over to the Word forum, as my Access problems have been fixed. Thank you all! :)
5.How do I paste from clipboard to range using Excel VBA
I have just moved from Windows 2000 & Office 2002 (Old) to XP Pro and Office
2003 (New). The following statements work in the old version and also in
the new version when I step through the code using the debugger. They fail
when I try and run the macro in the new version.
Code:
Dim oSheet As Worksheet
' copy text to windows clipboard
oSheet.Paste
' error generated on the above stating "Paste method of Worksheet Class
failed."
6. Pasting from the clipboard to the address box of inserthyperlink dialog window in vba
7. Pasting from Excel Clipboard with VBA Macro
8. Paste from clipboard via VBA