ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printing Problem in Word Document Created from Excel VBA (https://www.excelbanter.com/excel-programming/351821-printing-problem-word-document-created-excel-vba.html)

Jim Skrydlak[_2_]

Printing Problem in Word Document Created from Excel VBA
 
My client has asked me to create a Word document from an Excel worksheet.
The data to be copied consist of text in two non-adjacent columns, with
hidden columns between the two columns. The Excel worksheet is set up to
print in landscape format. When I create a document in Word in landscape
format and then copy the Excel data in, I get a nice-looking Word document in
landscape format. When I go to print, however, the right-side of the output
is cut off at about the same point at which it would be if the page width
were 8.5". I've tried attaching a template in landscape format to the
newly-opened document in Word. I'm specifying Orientation=wdorientlandscape,
pagewidth=application.inchestopoints(11),
pageheight=application.inchestopoints(8.5) and a whole lot of other things in
the activedocument.pagesetup properties. I've tried adding the new document
based on a template. Any ideas?

Kevin B

Printing Problem in Word Document Created from Excel VBA
 
Have you tried inserting the Excel file as a linked object into the Word
document.
--
Kevin Backmann


"Jim Skrydlak" wrote:

My client has asked me to create a Word document from an Excel worksheet.
The data to be copied consist of text in two non-adjacent columns, with
hidden columns between the two columns. The Excel worksheet is set up to
print in landscape format. When I create a document in Word in landscape
format and then copy the Excel data in, I get a nice-looking Word document in
landscape format. When I go to print, however, the right-side of the output
is cut off at about the same point at which it would be if the page width
were 8.5". I've tried attaching a template in landscape format to the
newly-opened document in Word. I'm specifying Orientation=wdorientlandscape,
pagewidth=application.inchestopoints(11),
pageheight=application.inchestopoints(8.5) and a whole lot of other things in
the activedocument.pagesetup properties. I've tried adding the new document
based on a template. Any ideas?


Jim Skrydlak

Printing Problem in Word Document Created from Excel VBA
 
No. I haven't. I'll give that a shot. I should also mention that, if I go
into Word and then manually set the page orientation to Landscape, things
work.

"Kevin B" wrote:

Have you tried inserting the Excel file as a linked object into the Word
document.
--
Kevin Backmann


"Jim Skrydlak" wrote:

My client has asked me to create a Word document from an Excel worksheet.
The data to be copied consist of text in two non-adjacent columns, with
hidden columns between the two columns. The Excel worksheet is set up to
print in landscape format. When I create a document in Word in landscape
format and then copy the Excel data in, I get a nice-looking Word document in
landscape format. When I go to print, however, the right-side of the output
is cut off at about the same point at which it would be if the page width
were 8.5". I've tried attaching a template in landscape format to the
newly-opened document in Word. I'm specifying Orientation=wdorientlandscape,
pagewidth=application.inchestopoints(11),
pageheight=application.inchestopoints(8.5) and a whole lot of other things in
the activedocument.pagesetup properties. I've tried adding the new document
based on a template. Any ideas?



All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com