Cannot display form programmatically

M

MSP

Hello everyone -

I have a coding issue with Access and would appreciate any
insight from you...

I am trying to open a custom Outlook form via VBScript
code within another custom Outlook form, as follows:

Dim olns
Dim myFolder
Dim myItem

Set olns = Item.Application.GetNameSpace("MAPI")
Set myFolder = olns.GetDefaultFolder(10)
Set myItem = myFolder.Items.Add("IPM.Note.MyNewForm")

myItem.Display

'close this form now that MyNewForm is displayed
Item.GetInspector.Close(False)


I have been able to narrow the problem to the
line "myItem.Display". This line works on some computers
and it does NOT work on others (the program simply ends).

What is going on? Can anyone suggest what I'm doing wrong
and what the fix is? Thank you.
 

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