Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / May 2008

Tip: Looking for answers? Try searching our database.

Sending Custom Form from Access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boyd - 15 May 2008 16:22 GMT
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
Sue Mosher [MVP-Outlook] - 16 May 2008 18:11 GMT
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.
Signature

Sue Mosher, Outlook MVP
  Author of Microsoft Outlook 2007 Programming:
    Jumpstart for Power Users and Administrators
   http://www.outlookcode.com/article.aspx?id=54

>I have the following Access VBA code to automatically send a custom
> form:
[quoted text clipped - 20 lines]
> Thanks,
> Boyd
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.