I'm trying to automate the printing of a weekly list of bookings for a resource. This is what I have so far:
I just can't figure out how to print the weekly view of the calendar...
I've seen the PrintOut method and it said: 'The PrintOut method is the only Outlook method that can be used for printing.' But it only seems to work for single items, not a calendar? What are my options?
Spencer
MCSE2k, MCSA2k, Net+, A+
Code:
Sub Print_Cal()
Dim objFolder As Folder
Dim objName As NameSpace
Dim objView As CalendarView
Dim objExp As Explorer
Dim objRecipient As Recipient
Set objName = Application.GetNamespace("MAPI")
Set objRecipient = objName.CreateRecipient("test_resource")
objRecipient.Resolve
If Not objRecipient.Resolved Then Exit Sub
Set objFolder = objName.GetSharedDefaultFolder(objRecipient, olFolderCalendar)
Set objExp = Application.Explorers.Add(objFolder)
Set objView = objExp.CurrentView
objView.Reset
objView.CalendarViewMode = olCalendarView5DayWeek '4
objView.Apply
'...HELP HERE
objExp.Close
Set objView = Nothing
Set objExp = Nothing
Set objFolder = Nothing
Set objRecipient = Nothing
Set objName = Nothing
End Sub
I just can't figure out how to print the weekly view of the calendar...
I've seen the PrintOut method and it said: 'The PrintOut method is the only Outlook method that can be used for printing.' But it only seems to work for single items, not a calendar? What are my options?
Spencer
MCSE2k, MCSA2k, Net+, A+