VBScript error with Outlook

M

Matt

I'm having difficulty calling Outlook from VBScript. It errors saying
ActiveX cannot call the object. Here is a snippet:

set ol = CreateObject("Outlook.Application")
Set olns = ol.GetNameSpace("MAPI")
Set myfolder = olns.GetDefaultFolder(13)
Set myItem = myFolder.Items.Add("IPM.Task.Munitions Task")
MyItem.Display

Anyone know why it won't recognize Outlook.Application?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top