ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Print an Embedded Word Doc (https://www.excelbanter.com/excel-programming/400336-print-embedded-word-doc.html)

[email protected]

Print an Embedded Word Doc
 
I have a workbook which contains multiple worksheets - each of which
has an embedded (not linked) Word document attached. I am attempting
to add a button on the very first sheet, which would print out ALL the
worksheets as well as the embedded Word documents.

However, all I've managed to do so far is print all the worksheets -
I'm having trouble getting the VBS code right for printing the
embedded Word documents.

Help?!

-Mike


Faisal...

Print an Embedded Word Doc
 
Try this

for i =1 to ActiveSheet.OLEObjects.Count
ActiveSheet.OLEObjects(i).Activate
ActiveSheet.OLEObjects(i).Object.Application.Print Out
next i


Faisal...
On Oct 31, 2:05 pm, wrote:
I have a workbook which contains multiple worksheets - each of which
has an embedded (not linked) Word document attached. I am attempting
to add a button on the very first sheet, which would print out ALL the
worksheets as well as the embedded Word documents.

However, all I've managed to do so far is print all the worksheets -
I'm having trouble getting the VBS code right for printing the
embedded Word documents.

Help?!

-Mike





All times are GMT +1. The time now is 06:51 AM.

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