Redemption Trapping a Condition or a Setting

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
 
K

Ken Slovak - [MVP - Outlook]

Send immediate:

HKCU\Software\Microsoft\Office\11.0\Outlook\Options\Mail\Send Mail
Immediately. Change 11.0 to reflect the version of Outlook. Outlook 2002 is
10.0, 2000 is 9.0, 2003 is 11.0, 2007 is 12.0. The value is a REG_DWORD and
1 is True and 0 is False.

Mail checking interval is somewhat harder, it's in general at
HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging
Subsystem\<Outlook profile name>\ but from there the settings are binaries
and I'm not sure what's what. I don't see anything helpful in the
RDOPOP3Account object in Redemption, you might have to work with the
associated ProfMan library to get that. I haven't really used ProfMan so I'm
not sure about that.
 
B

bobdydd

Thanks Ken

I will look more closely at that when I have time at the weekend.

I have downloaded a trial copy of Outlook Spy and from a quick look at
what it does I will be able find "Send Immediate" and achieve what I
want.

The problem with Outlook has been that you can't see what is going on
inside. Outlook Spy helps.

Regards Bob
 
K

Ken Slovak - [MVP - Outlook]

I prefer OutlookSpy myself, I use it every day. A free alternative though is
the MS supplied MFCMAPI, which you can Google for.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top