![]() |
Sending Excel ranges to Word as Metafile pictures
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? |
Sending Excel ranges to Word as Metafile pictures
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 -- Regards, Halim "Richard" wrote: 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? |
Sending Excel ranges to Word as Metafile pictures
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? "Halim" wrote in message ... 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 -- Regards, Halim "Richard" wrote: 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? |
Sending Excel ranges to Word as Metafile pictures
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. -- Regards, Halim "Richard" wrote: 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? "Halim" wrote in message ... 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 -- Regards, Halim "Richard" wrote: 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? |
All times are GMT +1. The time now is 10:03 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com