Copy from Excel and paste special in word


Posted by Rosalia on November 08, 2001 8:44 PM

Hi All,
I want to create a word document with some "pictures" from one excel book.
In VBA excel, I select the printing area:
ActiveSheet.PageSetup.PrintArea = MyRange.Address
... and copy it as a picture.
Selection.CopyPicture
... I have open a word application (wdApp) with one document in it (myDoc). My question is : how do I "tell" excel that I want to paste that picture in a word document called myDoc ?
I need to perform this operation few times (select range, copy and paste as picture in word).
Any help is very much appreciated.
thank you !



Posted by Damon Ostrander on November 13, 2001 3:06 PM

Hi Rosalia,

Here's an example that pastes in front of the first paragraph. The key is that you have to set the insertion point (selection) prior to doing the paste.

wdApp.ActiveDocument.Paragraphs(1).Range.Select
weApp.Selection.Collapse Direction:=wdCollapseStart
wdApp.Selection.Range.PasteSpecial Link:=False, _
DataType:=wdPasteMetafilePicture, _
Placement:=wdFloatOverText, DisplayAsIcon:=False

Damon