Sending Excel ranges to Word as Metafile pictures

R

Richard

I have about 70 sheets in a workbook and 2+- table/chart ranges per sheet. I
need to copy these excel ranges and paste them in a word document (with
..pastespecial) as a Metafile picture.

Is there a different way of doing this w/o using copy/paste?
 
H

Halim

Hi Richard,

This is the basic to copy that range to Word:
Sub pastetoWord()
Dim Wrd As New Word.Application
Range("A1:A10").CopyPicture xlScreen, xlPicture
Wrd.Documents.Add
Wrd.Visible = True
Wrd.Selection.Paste
End Sub
if you wish to copy in a word document, try this one:
Sub pasteallSheetstoWord()
Dim Wrd As New Word.Application
Dim Sht As Worksheet

Wrd.Documents.Add
Wrd.Visible = True

For Each Sht In ThisWorkbook.Sheets
Sht.Range("A1:A10").CopyPicture xlScreen, xlPicture
Wrd.Selection.Paste
Next Sht

End Sub
 
R

Richard

Halim, thank you for the response but your method uses copy/paste. Is there
an alternative way of doing this w/o using copy/paste?
 
H

Halim

Hi,

It is possible to do that thing without copy methode, but I never try that
one which create object for metafile using API, I think still use clipboard
memory to take the picture...

Try to visit OALTD.cu.uk at Bullen's page... find pastepicture.zip and
download it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top