Sending Custom Form from Access

B

Boyd

I have the following Access VBA code to automatically send a custom
form:

Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(olFolderInbox)
Set myItems = myFolder.Items
Set objForm = myItems.Add("IPM.Note.PublishedFormName.oft")
.... populate form properties from access table ...
objForm.Display
SendKeys "^{ENTER}"

This code works fine with Outlook 2003, but Outlook 2007 prompts the
user with a message regarding Ctrl+Enter to send the form .. they must
manually click Yes to proceed.

I replaced "objForm.Send" with "SendKeys ^{ENTER}" to prevent the
security prompt from displaying in O2003, but now I'm in a similar
situation w/ the new version.

Does anyone know of a workaround for this? I appreciate any direction
you have to offer.
Thanks,
Boyd
 
S

Sue Mosher [MVP-Outlook]

You should not get a security prompt in Outlook 2007 if the machine has up-to-date anti-virus protection. Check the anti-virus status in Tools | Trust Center | Programmatic Access.
 

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