Printing Calendar Views using VBA

  • Thread starter Thread starter Alan
  • Start date Start date
A

Alan

Hi All,

I am trying to work out how to get Outlook to print particular
calendar view (two in fact) every time that the Outlook session
finishes (upon the Application_Quit event).

However, I cannot seem to work out how to do this using VBA.

I have pasted the basic structure of what I want to do below.

I found a few thread on this subject, but none with an answer. The
third below came closest, but falls back on using command bars and
send keys !!

The other alternative appears to be 'My Outlook Calendar' which is the
fourth link below, but which falls back on using Word to achieve it?!?

Can anyone offer a simple solution to this? All I want to do is print
a calendar!

Thanks,

Alan.

http://groups.google.co.nz/groups?h...oup=microsoft.public.outlook.program_vba&sa=N

http://groups.google.co.nz/groups?h...oup=microsoft.public.outlook.program_vba&sa=N

http://groups.google.co.nz/groups?h...oup=microsoft.public.outlook.program_vba&sa=N

http://www.slipstick.com/addins/gallery/index.htm#myolcal


+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Private Sub Application_Quit()

Dim Response_Print As VbMsgBoxResult
Dim Response_Duplex As VbMsgBoxResult


Response = MsgBox("Do you wish to print out your calendar?", vbYesNo,
"Calendar Printout")


If Response = vbYes Then

' Print out calendar view A

Duplex = MsgBox("Do you wish to print out the other view on the
back?", vbYesNo, "Calendar Printout - Duplex")

If Duplex = vbYes Then

' Print out calendar view B

End If

End If

End Sub

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
You can't use Application_Quit, so forget that. By the time it fires all
Outlook objects are out of scope.
 
Ken Slovak - said:
You can't use Application_Quit, so forget that. By the time it fires
all Outlook objects are out of scope.

I had come to that conclusion too. I think I will actually do it upon
Outlook opening each time.

The real question however, remains, how to get it to print from VBA?

Thanks,

Alan.
 
The answers are in those links you posted. I haven't seen any real good ways
of doing what you want to do.
 
Back
Top