![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
In my vba code I'm receiving the following error "a program is trying
to access e-mail addresses you have stored in outlook. Do you want to allow this?..." I'm not accessing addresses at all so I don't know why the error message is appearing. I've been able to isolate the error to the final line of code below where I'm appending text - does anyone know how I can avoid this msg from appearing?? Sub test() Dim myOlApp As New Outlook.Application 'check if this is a mail object first If myOlApp.ActiveInspector.CurrentItem.Class = olMail Then myOlApp.ActiveInspector.CurrentItem.Subject = "test" 'append to email body myOlApp.ActiveInspector.CurrentItem.Body = myOlApp.ActiveInspector.CurrentItem.Body & " appending new text" End If End Sub |
#2
|
|||
|
|||
![]()
The Body property is also subject to the "object model guard." See http://www.outlookcode.com/d/sec.htm for your options.
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "marie" wrote in message oups.com... In my vba code I'm receiving the following error "a program is trying to access e-mail addresses you have stored in outlook. Do you want to allow this?..." I'm not accessing addresses at all so I don't know why the error message is appearing. I've been able to isolate the error to the final line of code below where I'm appending text - does anyone know how I can avoid this msg from appearing?? Sub test() Dim myOlApp As New Outlook.Application 'check if this is a mail object first If myOlApp.ActiveInspector.CurrentItem.Class = olMail Then myOlApp.ActiveInspector.CurrentItem.Subject = "test" 'append to email body myOlApp.ActiveInspector.CurrentItem.Body = myOlApp.ActiveInspector.CurrentItem.Body & " appending new text" End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
A program is trying to access your address Book | whylite | Outlook - Using Forms | 4 | July 13th 06 03:05 AM |
Unwanted Message pop-up about program trying to access address | K.N. Oll | Outlook and VBA | 0 | May 19th 06 01:20 AM |
Error Message- Program trying to access email address | Andre | Outlook - Installation | 2 | May 12th 06 02:20 AM |
how to access mail from different address | The Gordons | Outlook Express | 1 | May 1st 06 06:52 PM |
program trying to access email addresses | Joy Waggoner | Outlook - General Queries | 2 | March 16th 06 11:59 PM |