Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Printing through the Excel Object Library

Hi,

My target is quite clear:
1) Open an excel workbook.
2) Print it to a file
3) Copy the file to a new location

Pretty simple, huh? Well, I found it to be a bit tricky.

I am able to automatically do the workflow mentioned above but something is
missing...
In the MS-Word Object Library, the ApplicationClass has a property which is
something like BackgroundPrintingStatus... when that becomes -1 I know that
the printing actions is done. I couldn't find this or a familiar property in
the excel library.

My question is - how can I wait until excel finishes to print the workbook
and only then go on with my code?

Thanks,
Shay


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Printing through the Excel Object Library

print it in the foreground (not sure there is a background option in Excel).

Public sub Printit()

set wkbk = workbooks.Open("C:\My Folder\MyBook.xls")
wkbk.Printout
wkbk.SaveAs "C:\My Other Folder\BookBak.xls"
wkbk.Close SaveChanges:=False

End sub

each instruction won't fire until the previous action is complete.

--
Regards,
Tom Ogilvy

Shay Friedman wrote in message
...
Hi,

My target is quite clear:
1) Open an excel workbook.
2) Print it to a file
3) Copy the file to a new location

Pretty simple, huh? Well, I found it to be a bit tricky.

I am able to automatically do the workflow mentioned above but something

is
missing...
In the MS-Word Object Library, the ApplicationClass has a property which

is
something like BackgroundPrintingStatus... when that becomes -1 I know

that
the printing actions is done. I couldn't find this or a familiar property

in
the excel library.

My question is - how can I wait until excel finishes to print the workbook
and only then go on with my code?

Thanks,
Shay




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Object Library Ayo Setting up and Configuration of Excel 1 November 6th 09 08:04 PM
Microsoft Word and Excel 11.0 Object Library ekreider Excel Discussion (Misc queries) 4 January 8th 08 04:01 PM
Excel 2007 compatability, VBA Reference, MicrosoftOffice12. Object Library [email protected] Excel Discussion (Misc queries) 3 May 1st 07 06:57 PM
Microsoft Excel 11.0 Object Library documentation? Just-a-COG-in-the-works Charts and Charting in Excel 0 April 25th 07 05:22 PM
Microsoft Word Object Library in Excel Gaetan Excel Discussion (Misc queries) 4 March 14th 07 06:34 PM


All times are GMT +1. The time now is 01:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"