B
bobdydd
Hi All
I am using the redemption dll and accessing MS Outlook 2000 via MS
Access 2000 forms.
What I am trying to do is open a MS Access form, but before doing so, I
need to:
1. Check that MS Outlook is running.
2 Check that MS Outlook >>Tools>>Options>>Mail Delivery
a. Send messages immediately when connected.....is unchecked
b. Check for messaages every xx minutes......is unchecked
The code I am using is below, but I need something else. Most grateful
for any help.
Dim oOL As Outlook.Application
Dim stDocName As String
Dim stLinkCriteria As String
On Error Resume Next
Err.Clear
Set oOL = GetObject(, "Outlook.Application")
'Check if Outlook is open
If oOL Is Nothing Then
MsgBox "Before You Open the form" _
& vbCrLf & "You Need To Have Microsoft Outlook" _
& vbCrLf & "Running And Minimized.", vbCritical,
"Microsoft Outlook Not Running"
Err.Clear
Exit Sub
Set oOL = CreateObject("Outlook.Application")
End If
'Open Form
stDocName = "frmMyForm"
DoCmd.OpenForm stDocName, , , stLinkCriteria
I am using the redemption dll and accessing MS Outlook 2000 via MS
Access 2000 forms.
What I am trying to do is open a MS Access form, but before doing so, I
need to:
1. Check that MS Outlook is running.
2 Check that MS Outlook >>Tools>>Options>>Mail Delivery
a. Send messages immediately when connected.....is unchecked
b. Check for messaages every xx minutes......is unchecked
The code I am using is below, but I need something else. Most grateful
for any help.
Dim oOL As Outlook.Application
Dim stDocName As String
Dim stLinkCriteria As String
On Error Resume Next
Err.Clear
Set oOL = GetObject(, "Outlook.Application")
'Check if Outlook is open
If oOL Is Nothing Then
MsgBox "Before You Open the form" _
& vbCrLf & "You Need To Have Microsoft Outlook" _
& vbCrLf & "Running And Minimized.", vbCritical,
"Microsoft Outlook Not Running"
Err.Clear
Exit Sub
Set oOL = CreateObject("Outlook.Application")
End If
'Open Form
stDocName = "frmMyForm"
DoCmd.OpenForm stDocName, , , stLinkCriteria