E-Mail Access 2007

FREDDY67

Registered User.
Local time
Today, 14:15
Joined
Apr 23, 2007
Messages
52
I have a contacts db from which the user can send/read e-mails, the read element is sourced from a table linked to Outlook. The problem I have is that unless outlook is running in the background the outlook automated send/receive service is not running & thereby not updating the db with new e-mails. Is it then possible to execute the outlook send/receive service from code within access?

Any input or search ideas would be appreciated.

Thanks
Freddy
 
Not sure if this is what you are looking for, but it checks to see if Outlook is running...

Private Sub cmdEmailNotice_Click()
Dim Cancel As Integer
Dim ToList As String
Dim objOutlook As Object
On Error Resume Next
Set objOutlook = GetObject(, "Outlook.Application")

On Error GoTo 0
If Not IsObject(objOutlook) Then
'If objOutlook Is Nothing Then
MsgBox ("Your Email program is not open, start Outlook and try again")
Cancel = True

Else.... Your code here...
 
Curtis

Many thanks for your reply, whilst your post didn't solve the issue it put me firmly on the road to another solution. Now when the db opens it checks to see if Outlook is open & if it's not I have added code to open outlook minimized in the system tray, so the send/receive problem is solved.

Many Thanks

Freddy
 

Users who are viewing this thread

Back
Top Bottom