![]() |
|
#1
|
|||
|
|||
![]()
Hello!
I have this macro that adds an item to OL: Private Sub CommandButton1_Click() 'add to OL calendar Dim objOL As Object Dim objItem As Object Set objOL = CreateObject("Outlook.Application") Set objItem = objOL.CreateItem(1) With objItem .Body = ActiveDocument.TextBox10.Value .Duration = 60 .Start = ActiveDocument.TextBox19.Value & " " & ActiveDocument.TextBox20.Value .Subject = ActiveDocument.TextBox1.Value & " " & ActiveDocument.TextBox30.Value .ReminderMinutesBeforeStart = 10080 .Save End With Set objItem = Nothing Set objOL = Nothing MsgBox "Item has been added to your Outlook Calendar" End Sub TextBox30 is constant, everything else might change. I'd like, when the button is clicked: 1. Check the OL calendar for an item that has ActiveDocument.TextBox30.Value in the subject 2. If yes, update that item with the new date/time/info 3. If no, create the new item Is this possible? If not, I'd settle for at least finding the existing item so I can put a msgbox that it already exists so update it manually/exit sub. Thank you! |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Assigning templates to existing documents. Update Styles Enmasse. | bannerdog | Word | 1 | 02-28-2012 03:53 PM |
unable to update private meetings in outlook calendar | zerassar | Outlook | 3 | 02-16-2012 09:06 AM |
![]() |
matthew544 | Word VBA | 5 | 12-06-2011 03:19 AM |
Compare and Update Macro | AaronMoss | Excel Programming | 2 | 05-06-2011 04:54 AM |
Macro to update fields | rhatx | Word VBA | 0 | 03-02-2011 12:14 PM |