Addl Security Warning with XP-SP2

G

Greg Fox

To all,

I see no reference to this problem on the newsgrp, so perhaps it is just my
problem...

Using OL2003 and Redemption 3.4 I had no security warning
on this line before installing WinXP-sp2, but now get it...


Set oEmail = oMSOutlook.CreateItem(olMailItem)
Set oREmail = New Redemption.SafeMailItem
oREmail.Item = oEmail

Set oInspect = oEmail.GetInspector '<-- this now causes addr book
security warning
Set oRInspect = New Redemption.SafeInspector
oRInspect.Item = oInspect

I thought a solution would be to get the inspector from the SafeEmail
object, but I don't see a way to do that.

Thanks,
Greg Fox
 
D

Dmitry Streblechenko \(MVP\)

Are you sure it is that line? Running the following code in OutlookSpy
(click Item, go to the Script tab) does not produce any prompts:

MsgBox TypeName(MailItem.GetInspector)

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
G

Greg Fox

Yes, I just stepped through the code to double-check.
Note - this is an automation project, not VBA.
(I realize I am in a vba newsgrp, but this is the only place
I saw posts concerning Redemption).
 
G

Greg Fox

I also tried MsgBox TypeName(MailItem.GetInspector)
in OutlookSpy and had no security prompt.

But I took my code and created a new VB6 exe and placed the following code
behind a cmd button. This produced the same security warning in the same
place. It behaved the same way when I compiled the small exe.
Also - even though I get the propmpt, if I click 'No - don't allow access'
the GetInspector function still returns the inspector object.


Private Sub Command1_Click()

Dim oMSOutlook As Outlook.Application
Dim oEmail As Outlook.MailItem
Dim oInspect As Outlook.Inspector

Dim oREmail As Redemption.SafeMailItem
Dim oRInspect As Redemption.SafeInspector


On Error Resume Next
Set oMSOutlook = GetObject(, "Outlook.Application")
On Error GoTo Command1Click_Error
If oMSOutlook Is Nothing Then Set oMSOutlook =
CreateObject("Outlook.Application")

Set oEmail = oMSOutlook.CreateItem(olMailItem)
Set oREmail = New Redemption.SafeMailItem
oREmail.Item = oEmail

'with WinXP-SP2 - this is causing a security warning dialog
Set oInspect = oEmail.GetInspector

MsgBox TypeName(oInspect)
Set oRInspect = New Redemption.SafeInspector
oRInspect.Item = oInspect

MsgBox "Done"

Command1Click_Exit:
On Error Resume Next

Set oREmail = Nothing
Set oRInspect = Nothing
Set oEmail = Nothing
Set oInspect = Nothing
Set oMSOutlook = Nothing

Exit Sub

Command1Click_Error:
MsgBox Err.Description
Resume Command1Click_Exit

End Sub
 
D

Dmitry Streblechenko \(MVP\)

Works just fine here from an EXE as well as from VBA.
Do you have any third-party addins installed? When that code runs, Outook
raises the Inspectors.NewInspector event. If you have some third-party (or
yours) code trapping that event and doing anything with the inspector (such
as accessing the Inspector.HTMLEditor or Inspector.WordEditor properties,
which *are* blocked) you will get a prompt.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
S

Sue Mosher [MVP-Outlook]

I don't know if this is related, but I'm getting a security prompt when I
click the Inspector button in Outlook Spy.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
D

Dmitry Streblechenko \(MVP\)

This is because OutlookSpy touches the HTMLEditor and WordEditor properties.
I gotta fix that...

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
S

Sue Mosher [MVP-Outlook]

Hmm, but then why do both come up as "null"?



Dmitry Streblechenko (MVP) said:
This is because OutlookSpy touches the HTMLEditor and WordEditor
properties.
I gotta fix that...

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
G

Greg Fox

Good suggestion. Will check that and reply.

Dmitry Streblechenko (MVP) said:
Works just fine here from an EXE as well as from VBA.
Do you have any third-party addins installed? When that code runs, Outook
raises the Inspectors.NewInspector event. If you have some third-party (or
yours) code trapping that event and doing anything with the inspector (such
as accessing the Inspector.HTMLEditor or Inspector.WordEditor properties,
which *are* blocked) you will get a prompt.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
S

Sue Mosher [MVP-Outlook]

Maybe it was null because I said No to the security prompt earlier. This
time I said yes, on an HTML format WordMail message, and have HTMLEditor as
null and WordEditor as IDispatch etc (the full Document object interface).
Does that make sense?
 
D

Dmitry Streblechenko \(MVP\)

It does make sense - if you click "No", no object is returned, hence
OutlookSpy displays NULL.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
G

Greg Fox

By process of elimination I found that it was the Adobe Acrobat 6.0 Prof
add-in:
PDFMOutlook.PDFMOutlook

A Google search for that ProgID shows that others see this as well.
Good call! Thanks.
 

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

Similar Threads


Top