External References and Namespace Imports for Outlook automation with VBA
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-02-18 10:35 AM
I'm trying to use VBA to control Outlook, but I can't wrap my head around what External References and Namespace Imports to use to make the code work. Any suggestions on where to turn for detailed info on this?
thanks
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-02-18 01:08 PM
Hi Gustaf - if you have time to wait we'll be releasing an Outlook VBO soon, I don't know the exact date but it will probably come with v6.3. But in the meantime if you want to try your own the reference is something like C:\Program Files (x86)\Microsoft Office\root\Microsoft.Office.Interop.Outlook.dll and the Namespace is Microsoft.Office.Interop.Outlook
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-02-18 03:47 PM
Hello Gustaf - I agree with John that you have to use Microsoft.Office.Interop.Outlook. I personally had experience with that, I was trying to write some VB code blocks, however I wasn't really able to bypass Outlook object model security guard. You see, when using VBA for Outlook, each time I got a warning message that someone is trying to read\write in Outlook which is OK, but you have to manually confirm that it's me trying to execute the code.
@John_Carter, I wonder whether Outlook VBO will solve the problem
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-02-18 04:07 PM
Hi Dmytro - I think the security pop up is a Windows issue related to Antivirus. This research might help https://social.technet.microsoft.com/Forums/ie/en-US/e2c89fec-beb3-4224-a6cb-112704406907/cannot-change-programmatic-access-security?forum=outlook
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
22-02-18 12:54 PM
John, thanks for the reply! I know, that might definitely help me out. But what if I'm not allowed to do that?
In other words, I'm curious if the upcoming Outlook VBO will require additional setup of the software to make it works.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
22-02-18 02:49 PM
If your security policy will not allow programmatic access to Outlook, then I guess the VBO will not work for you.
