Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 22nd, 2007, 10:08 PM
Authorized User
 
Join Date: Oct 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Automated Emailing through Outlook

I have 2 questions about the Createobject method of the Outlook application object:

1. When I insert text into the body of the email by using the ".Body" or ".HTMLBody" properties the text gets cut off after so many characters(not sure exactly how many). Does anyone know why and how to let an unlimited number of text go into body of the email?

2. Does anyone know how to avoid the security warning that comes with Outlook 2003 when accessing the ".Body" and ".HTMLBody" properties? Below is what I found on the help file regarding this type of security warning:

HTML Body Property Remarks:
Outlook blocks code that attempts to access the HTMLBody property for security reasons. If you run a third-party add-in, custom solution, or other program that uses the HTMLBody property in Office Outlook 2003, you may receive the following warning:

A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this? If this is unexpected, it may be a virus and you should choose "No".

Body Property Remarks:
Microsoft Office Outlook 2003 inherits the Outlook 2002 object model guard behavior. In addition, it blocks code that attempts to access the Body property of various Outlook items. This allows users to verify that the program or add-in accessing the Body property of items is trustworthy, before they allow access to the contents of the items. Even though this leads to the display of security warnings in the existing COM add-ins that access the Body property of items, this will help prevent malicious code from running without the user being aware of it.

You can avoid the display of security warnings by deriving all objects, properties, and methods from the Application object passed in the OnConnection procedure of the add-in. Outlook trusts only the Application object passed in the OnConnection procedure of the add-in. If you create a new Application object— for example, by using the CreateObject method— that object and any of its subordinate objects, properties, and methods will not be trusted and the blocked properties and methods will throw security warnings.

Does anyone know how to use the OnConnection procedure or know of any 3rd party add-in software or of any method that will bypass this security warning?

thanks in advance,
Donrafeal
 
Old February 25th, 2007, 12:26 AM
Authorized User
 
Join Date: Oct 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I figured out a work around for question 1. I set the ".HTMLBody" property to a text box on a form which had very large number of text characters in it and all of the text in the textbox showed up in the body of the email.

Now I just need number 2 answered and I'll be good to go.

Donrafeal7






Similar Threads
Thread Thread Starter Forum Replies Last Post
Automated E-mail Envirochemist Access 3 April 25th, 2008 11:23 AM
Automated email ashik112 Classic ASP Professional 3 March 14th, 2007 11:11 PM
Automated (Custom) ErrorHandlers Loralee Access 1 July 16th, 2006 01:57 AM
Emailing from MS Access using vba and outlook katd007 Access VBA 0 July 8th, 2004 12:48 PM
Automated debugging JAVA Java GUI 0 April 14th, 2004 05:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.