'sceman.outlooksecuritymanager' com object not registered

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

'sceman.outlooksecuritymanager' com object not registered
Not registered error on a pc when application taht has teh com object as reference in installed 
Mike Vaughn




Posts: 5
Joined: 2011-02-18
I know there are a number of posts about this but none have helped me yet. I have an app that i added security maanager to today. runs fine on my PC that has VS 2005 and the manager installed, When I install the app on a client pc I still get the allow/deny pop uup then get the not registered message. I also have the securitymanager.2005 listed in project references and lisetd as a detected dependincy in the deploy project. Please help

Code looks like this
'Send the email
Dim SecurityManager As New AddinExpress.Outlook.SecurityManager
SecurityManager.DisableOOMWarnings = True
Try
'Send the email
msg.Send()
Finally
SecurityManager.DisableOOMWarnings = False
End Try
Posted 18 Feb, 2011 13:44:54 Top
Mike Vaughn




Posts: 5
Joined: 2011-02-18
Ok i got to the point where I have figured out how to add secman.dll to my deploy and then set it to add to program files\common files. I then ran regsvr32 to register the dll. When the vb app runs I no longer get the error message but still get the allow/deny pop up from Outlook 2010. The user in question was getting the error before we added the security manager com object, that is actually what drove me to buy it in the first place. Strange thine is I have other users running the same app on win7 just like him and they have never gotten the pop up at all. i want to get this working on the pc in question before i install it on all of my users
Posted 18 Feb, 2011 15:06:03 Top
Sally Peck




Posts: 22
Joined: 2005-07-13
Hi,

Tip,

- You need to register this DLL during installation time.

- If you get "SecMan not registered" error during your program run-time:
a) put codes inside a try/except block.
b) on exception, register DLL inside your code during run-time
c) re-run same routine again.
Posted 18 Feb, 2011 18:52:25 Top
Renat Tlebaldziyeu


Add-in Express team


Posts: 132
Joined: 2010-02-15
Hello Mike,

Do you develop a standalone application or an addin?
You need to call the ConnectTo method if you create a new Outlook instance, please use the following code:

Dim SecurityManager As New AddinExpress.Outlook.SecurityManager
SecurityManager.ConnectTo OutlookApplication
SecurityManager.DisableOOMWarnings = True
Try
'Send the email
msg.Send()
Finally
SecurityManager.DisableOOMWarnings = False
SecurityManager.Disconnect OutlookApplication
End Try

Did it help?

Thank you for sharing your knowledge, Sally!
Posted 21 Feb, 2011 03:03:42 Top
Mike Vaughn




Posts: 5
Joined: 2011-02-18
thanks to all. It is part of a standalone application i guess you could say. Have has this app for awhile. Friday one of the computers started getting the allow/deny popup. Haven;t chnaged anything in the app or Outlook. Since i have a part timer that also has the issue I found add-in express and purchased it. Like i said earlier my deploy has a reference to securitymanager.2005.dll and i also added secman.dll. The install put the file out there, but i had to run regsvr32 to get it to register. i do not get an error but I still get the popup. Below is the code that is called on button click.
Dim MSO As New Outlook.Application
Dim msg As Outlook.MailItem
Dim myRecipient As Outlook.Recipient
msg = MSO.CreateItem(Outlook.OlItemType.olMailItem)
'Check the To field
If Me.EmailToTB.Text = "" Then
MsgBox("You must enter a fax number or email address in the TO field above.", MsgBoxStyle.OkOnly)
Exit Sub
End If
'Build the TO field
strEmailTo = Me.EmailToTB.Text
myRecipient = msg.Recipients.Add(strEmailTo)
'Build the CC field
strEmailCCIndx = 0
Do Until strEmailCCIndx = 10
If strEmailCC(strEmailCCIndx) <> "" Then
myRecipient = msg.Recipients.Add(strEmailCC(strEmailCCIndx))
strEmailCCIndx = strEmailCCIndx + 1
Else
strEmailCCIndx = 10
End If
Loop
'Build the BC field
strEmailBCIndx = 0
Do Until strEmailBCIndx = 10
If strEmailBC(strEmailBCIndx) <> "" Then
myRecipient = msg.Recipients.Add(strEmailBC(strEmailBCIndx))
strEmailBCIndx = strEmailBCIndx + 1
Else
strEmailBCIndx = 10
End If
Loop
'Build the Subject and Body.
msg.Subject = Me.EmailSubjectTB.Text
msg.HTMLBody = Me.EmailBodyTB.Text
'Now add the attachment to the email
msg.Attachments.Add(strEmailAttachment)
'Send the email
Dim SecurityManager As New AddinExpress.Outlook.SecurityManager
SecurityManager.ConnectTo(MSO)
SecurityManager.DisableOOMWarnings = True
SecurityManager.DisableCDOWarnings = True
SecurityManager.DisableSMAPIWarnings = True
Try
'Send the email
msg.Send()
Finally
SecurityManager.DisableOOMWarnings = False
SecurityManager.DisableCDOWarnings = False
SecurityManager.DisableSMAPIWarnings = False
SecurityManager.Disconnect(MSO)
End Try
Dim msg2 As Outlook.MailItem
Dim myRecipient2 As Outlook.Recipient
msg2 = MSO.CreateItem(Outlook.OlItemType.olMailItem)
'Now build and send the email text message to the outside rep.
'Quote amt must be greater than his/her min. amt.
If SalespersonCellPhoneEmail <> "None" And _
(wsTotQuotePrice + wsTotDeliveryPrice) >= SalespersonTextMsgAmt Then
myRecipient2 = msg2.Recipients.Add(SalespersonCellPhoneEmail)
msg2.Subject = "Quote " & wsQuoteNo
If QuoteEntryFrm.CustnoTB.Text = "55555" Then
msg2.HTMLBody = RTrim(Mid(QuoteEntryFrm.NewCustomerTB.Text, 1, 20)) & " for " & _
Format((wsTotQuotePrice + wsTotDeliveryPrice), "$##,###,##0") & ". Contact " & _
QuoteEntryFrm.CustContactTB.Text & "." & " Quoted by " & _
QuoteEntryFrm.SalesPersonCB.Text
Else
msg2.HTMLBody = RTrim(Mid(QuoteEntryFrm.CustomerCB.Text, 1, 20)) & " for " & _
Format((wsTotQuotePrice + wsTotDeliveryPrice), "$##,###,##0") & ". Contact " & _
QuoteEntryFrm.CustContactTB.Text & "." & " Quoted by " & _
QuoteEntryFrm.SalesPersonCB.Text
End If
SecurityManager.ConnectTo(MSO)
SecurityManager.DisableOOMWarnings = True
SecurityManager.DisableCDOWarnings = True
SecurityManager.DisableSMAPIWarnings = True
Try
'Send the email
msg2.Send()
Finally
SecurityManager.DisableOOMWarnings = False
SecurityManager.DisableCDOWarnings = False
SecurityManager.DisableSMAPIWarnings = False
SecurityManager.Disconnect(MSO)
End Try
End If
Posted 21 Feb, 2011 08:00:09 Top
Renat Tlebaldziyeu


Add-in Express team


Posts: 132
Joined: 2010-02-15
Hi Mike,

It seems to me that you have the security warning pop up when adding a recipient to the message.
Please try to use the following code:

Dim MSO As New Outlook.Application
Dim msg As Outlook.MailItem
Dim myRecipient As Outlook.Recipient
Dim SecurityManager As New AddinExpress.Outlook.SecurityManager
SecurityManager.ConnectTo(MSO)
SecurityManager.DisableOOMWarnings = True
Try
msg = MSO.CreateItem(Outlook.OlItemType.olMailItem)
'Check the To field
If Me.EmailToTB.Text = "" Then
MsgBox("You must enter a fax number or email address in the TO field above.", MsgBoxStyle.OkOnly)
Exit Sub
End If
'Build the TO field
strEmailTo = Me.EmailToTB.Text
myRecipient = msg.Recipients.Add(strEmailTo)
'Build the CC field
strEmailCCIndx = 0
Do Until strEmailCCIndx = 10
If strEmailCC(strEmailCCIndx) <> "" Then
myRecipient = msg.Recipients.Add(strEmailCC(strEmailCCIndx))
strEmailCCIndx = strEmailCCIndx + 1
Else
strEmailCCIndx = 10
End If
Loop
'Build the BC field
strEmailBCIndx = 0
Do Until strEmailBCIndx = 10
If strEmailBC(strEmailBCIndx) <> "" Then
myRecipient = msg.Recipients.Add(strEmailBC(strEmailBCIndx))
strEmailBCIndx = strEmailBCIndx + 1
Else
strEmailBCIndx = 10
End If
Loop
'Build the Subject and Body.
msg.Subject = Me.EmailSubjectTB.Text
msg.HTMLBody = Me.EmailBodyTB.Text
'Now add the attachment to the email
msg.Attachments.Add(strEmailAttachment)
'Send the email
msg.Send()
Dim msg2 As Outlook.MailItem
Dim myRecipient2 As Outlook.Recipient
msg2 = MSO.CreateItem(Outlook.OlItemType.olMailItem)
'Now build and send the email text message to the outside rep.
'Quote amt must be greater than his/her min. amt.
If SalespersonCellPhoneEmail <> "None" And _
(wsTotQuotePrice + wsTotDeliveryPrice) >= SalespersonTextMsgAmt Then
myRecipient2 = msg2.Recipients.Add(SalespersonCellPhoneEmail)
msg2.Subject = "Quote " & wsQuoteNo
If QuoteEntryFrm.CustnoTB.Text = "55555" Then
msg2.HTMLBody = RTrim(Mid(QuoteEntryFrm.NewCustomerTB.Text, 1, 20)) & " for " & _
Format((wsTotQuotePrice + wsTotDeliveryPrice), "$##,###,##0") & ". Contact " & _
QuoteEntryFrm.CustContactTB.Text & "." & " Quoted by " & _
QuoteEntryFrm.SalesPersonCB.Text
Else
msg2.HTMLBody = RTrim(Mid(QuoteEntryFrm.CustomerCB.Text, 1, 20)) & " for " & _
Format((wsTotQuotePrice + wsTotDeliveryPrice), "$##,###,##0") & ". Contact " & _
QuoteEntryFrm.CustContactTB.Text & "." & " Quoted by " & _
QuoteEntryFrm.SalesPersonCB.Text
End If
'Send the email
msg2.Send()
Finally
SecurityManager.DisableOOMWarnings = False
SecurityManager.Disconnect(MSO)
End Try
End If

Did it work without the security warnings?

BTW You don't need to disable all kinds of security warnings, only OOM.
Posted 21 Feb, 2011 08:14:16 Top
Mike Vaughn




Posts: 5
Joined: 2011-02-18
:D
it works the only i chnaged from the code Renat suggested was to move the end if before the finally. Wouldn't compile the other way. I'll update if anything chnages. I have a second part to the question. is it possible to have my app register secman during install so i do not need to run regsvr32 after each install?
Posted 21 Feb, 2011 10:27:47 Top
Renat Tlebaldziyeu


Add-in Express team


Posts: 132
Joined: 2010-02-15
Good news, Mike!

Please look at the Outlook Security Manager deployment articles on our technical blog, here is the entry point:
http://www.add-in-express.com/creating-addins-blog/2010/06/16/outlook-security-manager2010-deployment/
Posted 21 Feb, 2011 10:43:07 Top
Mike Vaughn




Posts: 5
Joined: 2011-02-18
Followed Part 3 of the documentation and all is well. Thanks again Renat!
Posted 23 Feb, 2011 07:51:48 Top
Renat Tlebaldziyeu


Add-in Express team


Posts: 132
Joined: 2010-02-15
You are welcome, Mike!
Posted 23 Feb, 2011 08:01:00 Top