Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / July 2005

Tip: Looking for answers? Try searching our database.

Script for printing Daily Calendar and task list

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dbower - 04 Jul 2005 04:01 GMT
Is there any way to print a calendar and activity list each morning?  I have
looked at writing a Macro, and that does not seem to be possible.  Has anyone
found a way
Eric Legault [MVP - Outlook] - 04 Jul 2005 18:46 GMT
Outlook only exposes the PrintOut method for individual items (such as
e-mails, Appointments, etc.).  You can't control any print settings; you get
what you see when you click the Print button manually.

If you want to automate printing the Calendar view, you can set a reference
to the File -> Print... menu item and execute it automatically using this
macro:

Sub PrintCalendarView()
   Dim objNS As Outlook.NameSpace
   Dim objCal As Outlook.MAPIFolder
   Dim objCBB As Office.CommandBarButton
   
   Set objNS = Application.GetNamespace("MAPI")
   Set objCal = objNS.GetDefaultFolder(olFolderCalendar)
   objCal.Display
   
   Set objCBB = ActiveExplorer.CommandBars.FindControl(, 4)
   objCBB.Execute
   
   Set objNS = Nothing
   Set objCal = Nothing
   Set objCBB = Nothing
End Sub

Note that you still have to click the OK button.  It may be possible to
automatically click this using the SendKeys statement, but I couldn't do it
(modal dialogs are hard if not impossible to automate using that approach).

Signature

Eric Legault - B.A, MCP, MCSD, Outlook MVP
Try Picture Attachments Wizard for Outlook! http://tinyurl.com/ckytm
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/

> Is there any way to print a calendar and activity list each morning?  I have
> looked at writing a Macro, and that does not seem to be possible.  Has anyone
> found a way
Dbower - 04 Jul 2005 22:21 GMT
Eric,

Sounds like Outlook really doesn't have a good way to do this.  It is
certainly much easier in MS Access using their built in macro's, I just
thought this would be something that many users would want to do...

Thanks for your help....  I will just have to wait until Microsoft decides
to add a feature that will allow me to do this....

Doug

> Outlook only exposes the PrintOut method for individual items (such as
> e-mails, Appointments, etc.).  You can't control any print settings; you get
[quoted text clipped - 28 lines]
> > looked at writing a Macro, and that does not seem to be possible.  Has anyone
> > found a way
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.