Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

email calendar

Status
Not open for further replies.

iansmithwolves

Technical User
Jan 24, 2003
53
GB
I am using Outlook 2003 and want to sent the contents of this and next months calendar to another user, not at my site. Without using export (which I believe will export the whoe of outlook is there a way of achieving this.

Ian

Wolves
UK
 
You might try this, I haven't done this myself, but its better than nothing. You can select the calendar (highlight the dates). Go to file and save as a web page. You will have the option of where to save it (my doc. will be a good place into a new folder for this purpose). You should have the options of saving the appointments within the calendar for that time period. Once you have saved them, you can send the files as e-mail attachments. Since they are saved as web pages, any browser should open the files for viewing. Good luck I hope this works for you.
 
Below is an idea for a code alternative:

Code:
'''''''''''''''''''''''''''''''''''''''''''''''
''' Code tested with Office 2000!
'''''''''''''''''''''''''''''''''''''''''''''''
''' Export "Calendar" folder content (now - 
''' end of next month) to *.txt file
'''
''' Create OL button:
'''
''' 1. View>Toolbars>Customize...>Toolbars>New
''' 2. Enter a name for toolbar
''' 3. Click "Commands" tab
''' 4. Select "Macros" in "Categories"
''' 5. Drag "Project1.ExportCalendar onto button
''' 6. Optional: Modify Selection
'''
'''''''''''''''''''''''''''''''''''''''''''''''
Sub ExportCalendar()
On Error GoTo Err_ExportCalendar

Dim molNamespace As Outlook.NameSpace, molCalendar As Outlook.MAPIFolder, molItem As Outlook.AppointmentItem
Dim strOutput As String

Set molNamespace = Application.GetNamespace("MAPI")
Set molCalendar = molNamespace.GetDefaultFolder(olFolderCalendar)

strOutput = "C:\OL_CalendarItemsTest" & Format(Date, "mmddyy") & ".txt"

Open strOutput For Output As #1

Print #1, "StartDate,StartTime,EndDate,EndTime,EntryID,Subject,IsRecurring,RecurrenceState,ReminderSet,AllDayEvent,BusyStatus,Body,Category"  '' Print header

            For Each molItem In molCalendar.Items
            
                If molItem.Start >= Now And molItem.Start <= DateSerial(Year(Date), Month(Date) + 2, 0) Then

                      Print #1, Format(molItem.Start, "Short Date") & "," & Format(molItem.Start, "Short Time") & "," & _
                                Format(molItem.End, "Short Date") & "," & Format(molItem.End, "Short Time") & "," & _
                                molItem.EntryID & "," & molItem.Subject & "," & _
                                molItem.IsRecurring & "," & molItem.RecurrenceState & "," & molItem.ReminderSet & "," & _
                                molItem.AllDayEvent & "," & _
                                molItem.BusyStatus & "," & molItem.Body & "," & molItem.Categories
                End If
                
            Next

Exit_ExportCalendar:

    Close #1
    Set molNamespace = Nothing
    Set molCalendar = Nothing

    Exit Sub

Err_ExportCalendar:

    Debug.Print Err.Number, Err.Description
    Resume Next

End Sub

This is only a starter/inspiration, you could of course automate the entire process incl the sending of the mail.


TomCologne
 
Sometimes easy is better. You could also maximize the window, hide the navigation pane(alt+F1), select printscreen (PrtSc) and paste it into a Word document. Then save it under your name and e-mail it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top