Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-09-2011, 05:32 AM
Joe Patrick Joe Patrick is offline How do you update existing Outlook calendar item from Word with macro? Windows 7 64bit How do you update existing Outlook calendar item from Word with macro? Office 2007
Advanced Beginner
How do you update existing Outlook calendar item from Word with macro?
 
Join Date: May 2011
Posts: 33
Joe Patrick is on a distinguished road
Default How do you update existing Outlook calendar item from Word with macro?

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!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
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
How do you update existing Outlook calendar item from Word with macro? Automatically update dates using a macro 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

Other Forums: Access Forums

All times are GMT -7. The time now is 09:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft