outlook-vba

Why is there multiple Err.Number for the same Err.Description?

Hi, Reading various properties of the Outlook.MAPIFolder.Items collection results in an error when the user permissions are insufficient, for example if the folder is visible but no browsable. The error description is: You do not have sufficient permission to perform this operation on this object. See the folder contact or your system ...

Extending my Outlook VBA code to use Free/Busy and schedule appts.

I sometimes travel internationally and when I do, I have to meet with 5 to 10 internal collegues. Till now, what I do is use the following code to send out introductions and see when they may be free to meet. I put their first and last names in Excel, as well as whether or not I've met them before. Sub CreateInvite(lngDuration As Long, ...

itemadd event not firing when system goes to sleep mode

I am trying to monitor my Outlook inbox and download attachments. It works fine when I am using my computer but when I lock my computer it goes to sleep mode and the event does not fire i.e., not able to download attachments. Please suggest. I am not here to learn English. ...

Issue when attempting to sort recipients in To: field in Outlook

I am writing an Outlook VBA macro to alphabetically sort recipients when composing an email. It works fine for sorting, however if I have 3 recipients (for example), run the sort macro, and then remove a recipient, running the macro a second time causes the removed recipient to re-appear. When I step through the macro on the second run,...

Modifing an X-Header on Outlook using a VBA Macro

Hi all, I need to write a OutLook macro to read a special email header ("X-SpecialMe") and modify it. How is it possible to modify an X-Header on OutLook? Can you modify it before sending an email (inside a VBA event, for instance)? Thank you! ...

Making a macro runs automatically in Outlook

Hi All, I wrote a macro in VBA that does an action on some of the files that arrive to my inbox in Outlook. However, I will have to click a button or a shortkey to run this macro. Is there a way that this macro runs automatically whenever an email arrives to my inbox? Please help, ...

Export the outlook calendar meetings/Appointments to a Database

Hello All, I am having a request that if there is an option or a tool that I can get the microsoft outlook calendar meetings/Appointments exported immediately and automatically to a database(Access DB/ Oracle)? Is there is a way to do that? Thanks ...

Outlook 2007 event handler for connection status change

Is it possible to write an Outlook macro that will launch an alert (external application) if/when Outlook's connection status changes from 'Connected to Microsoft Exchange' to Offline or Disconnected. I've found numerous examples regarding instantiation of an Outlook session in a .Net application and using the ExchangeConnectionMode pro...

Copy email to the clipboard with Outlook VBA

How do I copy an email to the clipboard and then paste it into excel with the tables intact? I am using Outlook 2007 and I want to do the equivalent of "Click on email > Select All > Copy > Switch to Excel > Select Cell > Paste". I have the Excel Object Model pretty well figured out, but have no experience in Outlook other than...

Copy table in Outlook body to the clipboard and paste in Excel VBA

I need to copy table in Outlook body to the clipboard and paste in Excel using VBA. I need to preserve the data in the cells, but I do not know how to do that. The data looks likes this, but when copied and pasted into excel it would be in four cells. -339 -339 5 5 Thanks ...

What is the quickest way to store attachments in an outlook mailbox mails?

Suppose i have my mailbox configured and i have a special folder for mails with attachments in outlook 2007. What i want to do is i. either configure outlook to save the attachment of mails coming in a specified folder (Mails with Attachments) to specific folder in my computer drive in a desired folder ii. Or if i can write some macro ...

Creating a single file from multiple notes in Outlook VBA

Currently, my VBA code creates a single file for each note. Here's some simplified sample code: Sub saveNotes() Set myNote = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderNotes) For ibi = 1 To myNote.Items.Count fname = myNote.Items(ibi).Subject myNote.Items(ibi).SaveAs "C:\Temp\" & fname & ".txt", 0 Next ...