Redemption OL 2003 question

G

Greg Fox

Redemption with OL2002 solves the problem
of getting the "app is trying to access your addr book... allow?"
dialog when the code adds a recipient.

But the same code with OL2003 still gets the dialog.
Is there a setting that I am missing, perhaps?

Thanks, Greg Fox
 
G

Greg Fox

Code as follows: (VB6, automation)

Dim oEmail As Outlook.MailItem
Dim oInspect As Outlook.Inspector
Dim oREmail As Redemption.SafeMailItem

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

oREmail.Recipients.Add sPersonEmail
oEmail.Subject = "The Info You Requested"

Set oInspect = oEmail.GetInspector
If oInspect.IsWordMail Then
Set oEDoc = oInspect.WordEditor

'code to populate the email body ...

oEmail.Save
sEmailEntryID = oEmail.EntryID
oEmail.Close olDiscard

End If


'-----------------------------------------------
 
S

Sue Mosher [MVP-Outlook]

If you stepped through this code with the debugger, I think you'd find that
WordEditor is a protected object in Outlook 2003. There's no way to avoid a
prompt when using it in VB6 code, even with Redemption.

A workaround when creating a new message might be to start from the Word
document, not the Outlook MailItem, and use the Office.MsoEnvelope class and
its Item object to return an Outlook MailItem. I haven't been able to get it
to work from outside Word VBA yet, but I'll keep whacking at it.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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