Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range Object CopyPicture Method; Paste to MS Word
I am using
Selection.CopyPicture Appearance:=xlPrinter, Format:=xlPicture I was thinking that this code would copy a worksheet as it looks when printed from Excel. My worksheet when printed is nicely formatted and is printed in landscape and is 3 pages long. When I use the code below, all it does is past the range and crams the whole thing on one page in Word without any landscape, page formatting, etc. Any suggestions on how to really copy and past someting "as it looks when you print it out on the printer"? Thanks. Marian Sub pictureasprinted() Dim wrdApp As Word.Application Dim wrdDoc As Word.Document Range("A5:N113").Select Selection.CopyPicture Appearance:=xlPrinter, Format:=xlPicture Set wrdApp = CreateObject("Word.Application") wrdApp.Visible = True Set wrdDoc = wrdApp.Documents.Add ' create a new document With wrdDoc .Content.Paste .SaveAs ("C:\Foldername\MyNewWordDoc5.doc") .Close ' close the document End With wrdApp.Quit ' close the Word application Set wrdDoc = Nothing Set wrdApp = Nothing End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
run-time error, method 'paste' of object - worksheet failed. | Excel Programming | |||
Method 'Paste' of object '_Worksheet' failed | Excel Discussion (Misc queries) | |||
Range Question / error 1004: method Range of object Worksheet has failed | Excel Programming | |||
Method 'Paste' of object '_worksheet' failed | Excel Programming | |||
Copypicture method failed | Excel Programming |