A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Recurring Meetings Using VBA



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old April 21st 06, 05:49 PM posted to microsoft.public.outlook.program_vba
WD
external usenet poster
 
Posts: 6
Default Recurring Meetings Using VBA

I have written code to move meetings from my calendar to a public calendar.
All meetings move successfully except recurring meetings. Below is the code
that I am using. Each time I use the any of the recurring objects nothing
seems to happen or it fails. Any assistance would be appreciated. Code below:

Sub MoveMeetings()
'Move meetings from my personal calendar to the public calendar

Dim olFolder As MAPIFolder
Dim olFolderSAP As MAPIFolder
Dim ns As Outlook.NameSpace
Dim appts As Object
Dim appt As Object
Dim apptrec As Object
Dim SAPMeeting As Object
Dim date1 As Date
Dim date2 As Date
Dim I As Integer

Const strPublicFolder = "Public Folders\All Public Folders\SAP Calendar"

Set ns = Outlook.GetNamespace("MAPI")
Set olFolder = ns.GetDefaultFolder(olFolderCalendar)
Set appts = olFolder.Items
Set olFolderSAP = GetFolder(strPublicFolder)
Set SAPMeeting = olFolderSAP.Items.Add()

date1 = InputBox("Move items between - this date: ", "Start Date")
date2 = InputBox("and this date: ", "End Date")

For Each appt In appts
If Format(appt.Start, "short date") = date1 And Format(appt.Start,
"short date") date2 Then
Set apptrec = appt.GetRecurrencePattern
With SAPMeeting
.Subject = appt.ConversationTopic
.Start = appt.Start
.End = appt.End
.Location = appt.Location
.Organizer = appt.Organizer
.Body = appt.Body
.RequiredAttendees = appt.RequiredAttendees
.OptionalAttendees = appt.OptionalAttendees
.RecurrenceType = apptrec.RecurrenceType
.Interval = apptrec.Interval
.PatternEndDate = apptrec.PatternEndDate
.Save
End With
End If
Next appt

End Sub

WD

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook should let me select my own dates for recurring meetings The Scheduler Outlook - Calandaring 1 March 30th 06 04:28 AM
Recurring Meetings duplicating Mobyduck Outlook - Calandaring 0 February 28th 06 01:36 PM
Disapearing Ocurrences for Recurring meetings Executive Assistant to... Outlook - Calandaring 0 February 9th 06 03:06 AM
Changes to recurring meetings should only apply to the future chimaera Outlook - Calandaring 1 February 8th 06 05:18 PM
Disappearing recurring meetings [email protected] Outlook - Calandaring 0 January 12th 06 12:17 AM


All times are GMT +1. The time now is 11:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.