Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Can i open an excel file and print it automaticaly from outlook

I would like to make excel print a sheet on a weekly basis. the sheet is
part of an accounting file and the results are updated daily. I need the
information to be either printed or saved to my desktop for manual printing
later. This needs to be completed every Monday.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Can i open an excel file and print it automaticaly from outlook

This is a question for the programming group in outlook. Below is a macro
that will run from outlook macro (not excel). I don't know how to have
outlook schedule the task (macro) to run weekly.


Sub openexcel()
'Dim wb As excel.workbook

FName = "C:\temp\book1.xls"
Set xlApp = Application.CreateObject("Excel.Application")
Set xlbook = xlApp.Workbooks.Open(FName)
xlbook.PrintOut

End Sub

"Stew J" wrote:

I would like to make excel print a sheet on a weekly basis. the sheet is
part of an accounting file and the results are updated daily. I need the
information to be either printed or saved to my desktop for manual printing
later. This needs to be completed every Monday.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Can i open an excel file and print it automaticaly from outloo

Hi Joel, Thats great thanks, just one more questions at the moment, - if I
wanted to only print 1 sheet of 3 within the book, is there a way to do that?

Thanks
Stew

"Joel" wrote:

This is a question for the programming group in outlook. Below is a macro
that will run from outlook macro (not excel). I don't know how to have
outlook schedule the task (macro) to run weekly.


Sub openexcel()
'Dim wb As excel.workbook

FName = "C:\temp\book1.xls"
Set xlApp = Application.CreateObject("Excel.Application")
Set xlbook = xlApp.Workbooks.Open(FName)
xlbook.PrintOut

End Sub

"Stew J" wrote:

I would like to make excel print a sheet on a weekly basis. the sheet is
part of an accounting file and the results are updated daily. I need the
information to be either printed or saved to my desktop for manual printing
later. This needs to be completed every Monday.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Can i open an excel file and print it automaticaly from outloo

from
xlbook.PrintOut
to
xlbook.sheets("Sheet1").PrintOut
or
xlbook.sheets(1).PrintOut

It took me a while to get the right syntax for the OBJECT line. Microsoft
has two different syntax for Macros. the one for excel and the one for other
office products. Try going to help in Outlook but couldn't find the correct
help. finally I went to word and looked up object. found the correct syntax
and it also worked in Outlook.

for microsoft Office
Set xlApp = Application.CreateObject("Excel.Application")
for excel
Set xl = CreateObject("Excel.Sheet")

"Stew J" wrote:

Hi Joel, Thats great thanks, just one more questions at the moment, - if I
wanted to only print 1 sheet of 3 within the book, is there a way to do that?

Thanks
Stew

"Joel" wrote:

This is a question for the programming group in outlook. Below is a macro
that will run from outlook macro (not excel). I don't know how to have
outlook schedule the task (macro) to run weekly.


Sub openexcel()
'Dim wb As excel.workbook

FName = "C:\temp\book1.xls"
Set xlApp = Application.CreateObject("Excel.Application")
Set xlbook = xlApp.Workbooks.Open(FName)
xlbook.PrintOut

End Sub

"Stew J" wrote:

I would like to make excel print a sheet on a weekly basis. the sheet is
part of an accounting file and the results are updated daily. I need the
information to be either printed or saved to my desktop for manual printing
later. This needs to be completed every Monday.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Can i open an excel file and print it automaticaly from outloo

Works a treat.

Many thanks
Stew

"Joel" wrote:

from
xlbook.PrintOut
to
xlbook.sheets("Sheet1").PrintOut
or
xlbook.sheets(1).PrintOut

It took me a while to get the right syntax for the OBJECT line. Microsoft
has two different syntax for Macros. the one for excel and the one for other
office products. Try going to help in Outlook but couldn't find the correct
help. finally I went to word and looked up object. found the correct syntax
and it also worked in Outlook.

for microsoft Office
Set xlApp = Application.CreateObject("Excel.Application")
for excel
Set xl = CreateObject("Excel.Sheet")

"Stew J" wrote:

Hi Joel, Thats great thanks, just one more questions at the moment, - if I
wanted to only print 1 sheet of 3 within the book, is there a way to do that?

Thanks
Stew

"Joel" wrote:

This is a question for the programming group in outlook. Below is a macro
that will run from outlook macro (not excel). I don't know how to have
outlook schedule the task (macro) to run weekly.


Sub openexcel()
'Dim wb As excel.workbook

FName = "C:\temp\book1.xls"
Set xlApp = Application.CreateObject("Excel.Application")
Set xlbook = xlApp.Workbooks.Open(FName)
xlbook.PrintOut

End Sub

"Stew J" wrote:

I would like to make excel print a sheet on a weekly basis. the sheet is
part of an accounting file and the results are updated daily. I need the
information to be either printed or saved to my desktop for manual printing
later. This needs to be completed every Monday.

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
excel file opened automaticaly at specified time & date aligaz Excel Discussion (Misc queries) 2 December 17th 07 04:45 PM
can excel automaticaly open file from specific folder sand Excel Discussion (Misc queries) 1 July 7th 07 03:56 PM
excel open in outlook if outlook is running kirk Excel Discussion (Misc queries) 0 May 24th 06 06:42 PM
Open a print output sent to file Ted Johnston Excel Discussion (Misc queries) 0 February 24th 06 10:10 AM
How can we back up a permanant copy of an excel file automaticaly Gita Excel Discussion (Misc queries) 2 July 30th 05 12:46 AM


All times are GMT +1. The time now is 07:47 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"