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 Help 51,912 discussions
icon
Computer Newbies 10,498 discussions
icon
Laptops 20,411 discussions
icon
Security 30,882 discussions
icon
TVs & Home Theaters 21,253 discussions
icon
Windows 10 1,672 discussions
icon
Phones 16,494 discussions
icon
Windows 7 7,855 discussions
icon
Networking & Wireless 15,504 discussions

REVIEW

Meet the drop-resistant Moto Z2 Force

The Moto Z2 Force is really thin, with a fast processor and great battery life. It can survive drops without shattering.