Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2005

Tip: Looking for answers? Try searching our database.

Sending Mail from Access 2000 via Outlook

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chaim - 18 Jul 2005 17:20 GMT
Using the Outlook MailItem object, I can format my email as desired and
.Display to popup the Outlook mail editing window with the appropriate
contents. There are three problems though:
1) I get those annoying popups due to the Outlook security patches
2) when I either try to send the email directly via the Send method or the
user selecting the Send menu option, I get a popup saying simply that "The
Operation Failed".
3) Sometimes, there is also the problem that when I create the Outlook
Application, I get an Internal Error. No other detail is provided.

So, questions are: Is there a way of avoiding those popups? Since I am not
an administrator I am not able to mess around with the properties and options
of the patch install. And- to make matters worse- I am only doing this for a
small piece of a very large corporation, and I am therefore unlikely to get
the support that I would need to play with the install options. Certainly no
instantaneously. In spite of this, is there any way around this? The network
is totally internal, the threat of (intentional) viruses/other nasties is 0.

Question 2 is: What is preventing me from sending the emails after I jump
through all the security hoops? The code that executes looks like:

dim oOutApp as Outlook.Application, _
     oOutMail as Outlook.MailItem, _
     oOutRecip as Outlook.Recipients

set oOutApp = CreateObject ("Outlook.Application")
set oOutMail = oOutApp.CreateItem (olMailItem)
with oOutMail
   set oOutRecip = .Recipients.Add (recipName)
   oOutRecip.Type = olTo
   set oOutRecip = .Recipients.Add (CurrentUser)
   oOutRecip.Type = olOriginator
   .Subject = ....
   .Body = ....
   .Display
end with
...

And Question 3: Why do I sometimes encounter these Internal Application
Errors? I cannot predictably reproduce this one.

TIA
Signature

Chaim

Mr B - 18 Jul 2005 18:15 GMT
Chairm,

Take a look here: http://www.mvps.org/access/modules/mdl0019.htm

This was for Access 98, however, I think now you need to add a reverence to:
OLE Automation.

Signature

HTH

Mr B

> Using the Outlook MailItem object, I can format my email as desired and
> .Display to popup the Outlook mail editing window with the appropriate
[quoted text clipped - 38 lines]
>
> TIA
 
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.