Got promlems in MS Access 2003

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

Got promlems in MS Access 2003
Not able to use the ActiveX from within MS Access 
Henrik Malmvig




Posts: 3
Joined: 2006-04-20
Hi,

Can I not use the osmax.ocx within MS Access 2003?

My object is returned empty while connecting to Outlook 2003!


'Code stored in a module and called when a form opens event.

Dim SecurityManager As Object
Dim Outlook As Object


Set Outlook = CreateObject("OutLook.Application")

'Outlook object seems ok in objectwatcher

Set SecurityManager = CreateObject("AddInExpress.OutlookSecurityManager")

'No error but empty object in watch

SecurityManager.ConnectTo Outlook

SecurityManager.DisableOOMWarnings = True

:
:
'error handling


Can you please help me


Best regards
Malm
Posted 20 Apr, 2006 04:58:53 Top
Dmitry Kostochko


Add-in Express team


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

What else is happening besides an empty object in watch? Do you see any exceptions or errors? Do you see the security warning?

Posted 20 Apr, 2006 07:03:34 Top
Henrik Malmvig




Posts: 1
Joined: 2006-04-20
The problem is that actually nothing bad happens besides the annoying dialog of Outlook. What worries me is that after the CreateObject statement I can't see any members of the OutlookSecurityManager class. I would understand if the CreateObject gave somekind of error.

I have moved the ocx and dll to the system32 folder and used the regsrv32 to register them.


-Malm
Posted 20 Apr, 2006 08:24:15 Top
Dmitry Kostochko


Add-in Express team


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

Your code looks good and it should work correctly and disable Outlook Object Model warnings. But you see them. Please email me a piece of your code that makes the security warning fire, I will do my best to help you.


Posted 20 Apr, 2006 09:21:55 Top
Henrik Malmvig




Posts: 3
Joined: 2006-04-20
Aha the AboutBox member works so the object has been created!


Instead of using MAPI I've changed the VBA to test using DoCmd.SendObject.

(Yeah I know in my first test I used the wrong member)

Now I set every member to True like:

Dim SecurityManager As Object
Dim Outlook As Object


Set Outlook = CreateObject("OutLook.Application")

Set SecurityManager =
CreateObject("AddInExpress.OutlookSecurityManager")

SecurityManager.ConnectTo Outlook

SecurityManager.DisableOOMWarnings = True

SecurityManager.DisableCDOWarnings = True

SecurityManager.DisableSMAPIWarnings = True

DoCmd.SendObject acSendNoObject,,, "???@yahoo.com",,,"New test",
"My Message",False

:
:

The problem remains - the dialog "A program are trying to..." still popup.


What am I missing here?




Posted 20 Apr, 2006 09:26:00 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
The DoCmd.SendObject method uses the Simple MAPI technology but not the Outlook Object Model. So, your code should look like this:

Dim SecurityManager As Object
Set SecurityManager =
CreateObject("AddInExpress.OutlookSecurityManager")

SecurityManager.DisableSMAPIWarnings = True

DoCmd.SendObject acSendNoObject,,, "???@yahoo.com",,,"New test",
"My Message", False

SecurityManager.DisableSMAPIWarnings = False

Posted 20 Apr, 2006 09:36:39 Top
Henrik Malmvig




Posts: 3
Joined: 2006-04-20
Thank you alot - it works for me :)

Most have been the wrong member I disabled and in my quest for finding the problem I just maked things worse ;)


Posted 21 Apr, 2006 03:19:03 Top