Sending Custom Form from Access

  • Thread starter Thread starter Boyd
  • Start date Start date
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
 
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.
 
Back
Top