Printing Calendar Views using VBA

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

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
K

Ken Slovak - [MVP - Outlook]

You can't use Application_Quit, so forget that. By the time it fires all
Outlook objects are out of scope.
 
A

Alan

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.
 
K

Ken Slovak - [MVP - Outlook]

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top