This only works when outlook is closed

Add-in Express™ Support Service
That's what is more important than anything else

This only works when outlook is closed
 
Sean Dukes




Posts: 1
Joined: 2006-01-10
I have a VB6 project and I'm using MAPI to send messages. Here's a brief code sample (osmOutlookSecurityManager is the name I've given the Outlook Security Manager control):

Dim oOutlookApp As Object

'Turn off security warnings if using Outlook
Set oOutlookApp = CreateObject("Outlook.Application")
Call osmOutlookSecurityManager.ConnectTo(oOutlookApp)
osmOutlookSecurityManager.DisableSMAPIWarnings = True

MAPISession.SignOn

With MAPIMessages
.RecipDisplayName = "test@one.2"
.MsgSubject = "Test subject"
.MsgNoteText = "Test content"
.SessionID = MAPISession.SessionID
.Send False
End With

MAPISession.SignOff

'Re-enable outlook security
osmOutlookSecurityManager.DisableSMAPIWarnings = False
Set oOutlookApp = Nothing

This works fine when Outlook is not open, but if Outlook is already open then I get all the standard security stuff popping up. How should I amend this to work with an existing open outlook application?

Thanks Sean

PS Apologies if this is answered somewhere else - I did have a look first!
Posted 10 Jan, 2006 13:24:16 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Sean,

Please send me your project (or some test project with a similar code) for testing. Please remember to specify what Outlook version you use.

Posted 11 Jan, 2006 07:01:55 Top
Guest


Guest


OK Dmitry. It would be difficult to send you the whole thing so I'll knock something up that produces the same behaviour. Thanks. Sean
Posted 11 Jan, 2006 09:11:50 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Sean,

Thank you. I think it will be very helpful when testing.
Posted 11 Jan, 2006 09:31:50 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Sean,

I received and replied your first email but haven't got your reply with attachment yet. Did you receive my last email? BTW, you can find our email address in the SUPPORT section of the readme.txt file.

Posted 12 Jan, 2006 07:04:51 Top