fereallthings.blogg.se

Export exchange public folder calendar to outlook .pst file
Export exchange public folder calendar to outlook .pst file







export exchange public folder calendar to outlook .pst file
  1. #Export exchange public folder calendar to outlook .pst file how to#
  2. #Export exchange public folder calendar to outlook .pst file code#

MsgBox "In the next dialog, please select the destination folder where you want the folder items copied to.", vbOKOnly MsgBox "In the next dialog, please select the parent folder where you want the new folder copied to.", vbOKOnly & " will also be copied.", vbYesNo + vbQuestion, "Select Copy Type") = vbYes Then If MsgBox("Do you wish to copy the entire folder? Click 'No' to copy just the contents of the folder. If objSourceFolder Is Nothing Then GoTo Exitt: 'User cancelled MsgBox "In the next dialog, please select the source folder containing the items you want to copy.", vbOKOnly ObjOutputFile.WriteLine objAppointment.Subject & "," & objAppointment.Start & "," & objAppointment.Endĭim objSourceItem As Object, objCopy As Objectĭim objSourceFolder As Outlook.MAPIFolderĭim objDestinationFolder As Outlook.MAPIFolder ObjOutputFile.WriteLine "Subject,Start,End"įor Each objAppointment In objAppointments Set objOutputFile = objFS.OpenTextFile("C:\Temp\AppointmentExport.csv", ForWriting _ Set objFS = New Scripting.FileSystemObject Set objAppointments = objCalendarFolder.Items Set objCalendarFolder = objNS.GetDefaultFolder(olFolderCalendar)

export exchange public folder calendar to outlook .pst file

Set objNS = Application.GetNamespace("MAPI") 'You must set a reference to the Microsoft Scripting Runtime library to use the FileSystemObjectĭim objAppointments As Outlook.Items, objCalendarFolder As Outlook.MAPIFolderĭim objAppointment As Outlook.AppointmentItemĭim objFS As Scripting.FileSystemObject, objOutputFile As Scripting.TextStream

#Export exchange public folder calendar to outlook .pst file code#

You may find the following sample code helpful (listed in the VBA script to export Calendar to PST and CSV forum thread): Sub ExportAppointmentsToCSVFile()

#Export exchange public folder calendar to outlook .pst file how to#

The How to automate Outlook from another program article describes all the required steps. Instead of exporting and then importing the required data you may consider automating Outlook from Access.









Export exchange public folder calendar to outlook .pst file