Office & Productivity Software forum

General discussion

Erasing Outlook Calendar from within Excel

by littlegreenmen13 / June 22, 2005 1:40 AM PDT

I have several schedules in different Excel files that I need to export. I need to run the exporter from each file everyday to keep my Calendar up to date. How can I have the macro in each Excel file erase all items from the Outlook Calendar with a given address before it exports my dates? In other words: I run the Macro; it scans the outlook calendar and erases all entries in my Outlook Calendar with an address of "123 Anywhere St"; then it scans my list of dates and copies them from Excel to my Outlook Calendar. I already have the part written that scans my list of dates and copies them to Excel, it's just the erasing part I need help with. Right now when I run my macro to scan and export the dates it simply adds to the Calendar. If I already ran it once then I run it again, I'll have duplicate entries in Outlook. Also, how would I have Excel erase all events in Tasks with a given property (for the same reasons as the Calendar)? Thank you for the help.

Discussion is locked
You are posting a reply to: Erasing Outlook Calendar from within Excel
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Erasing Outlook Calendar from within Excel
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
A little bit of help.
by Kees Bakker / June 22, 2005 4:34 AM PDT

Outlook is programmable in VBA, like Excel. And I suppose it's an OLE-compatible program.

So all you've got to do is open the the Outlook object, and run the VBA-code to do what you want in it from Excel.

I must admit I've never done it, so for me it's pure theory. But I found two helpful links with google:
http://www.exceltip.com/st/Basic_information_ about_OLE_automation_using_VBA_in_Microsoft_Excel/462.html
and
http://www.exceltip.com/st/Control_Outlook_ from_Excel_using_VBA_in_Microsoft_Excel/464.html

This is where I should start. I might continue by asking a colleague of mine or buying a good book on the subject, depending on what google has more to offer.
Don't expect to find somebody here to provide you with any custom code you need.

Kees

Collapse -
Thank you
by littlegreenmen13 / June 22, 2005 5:10 AM PDT
In reply to: A little bit of help.

Thank you very much for the reply. I'll check out those 2 sites. I've figured out how to link Outlook and Excel, it's just I haven't been able to find the particular code to erase Outlook Calendar & Task entries from within Excel. So continues the search, but nonetheless I really appreciate your response.

Collapse -
Re: VBA in Outlook
by Kees Bakker / June 22, 2005 6:28 AM PDT
In reply to: Thank you

I found the VBA help in Access and Excel very good. Never tried the Outlook version. But it could be a good start on the Outlook particulars (objects, methods, properties).

There are a lot of helpful VBA sites on the net also. Google does a great job to find the info you need once you know a few keywords to direct the search. Start with VBA Outlook and then for example calender item or calender erase.

You seem to be knowledgeable enough to get this up and running.

Kees

Popular Forums
icon
Computer Newbies 10,686 discussions
icon
Computer Help 54,365 discussions
icon
Laptops 21,181 discussions
icon
Networking & Wireless 16,313 discussions
icon
Phones 17,137 discussions
icon
Security 31,287 discussions
icon
TVs & Home Theaters 22,101 discussions
icon
Windows 7 8,164 discussions
icon
Windows 10 2,657 discussions

CNET FORUMS TOP DISCUSSION

Help, my PC with Windows 10 won't shut down properly

Since upgrading to Windows 10 my computer won't shut down properly. I use the menu button shutdown and the screen goes blank, but the system does not fully shut down. The only way to get it to shut down is to hold the physical power button down till it shuts down. Any suggestions?