Solved

Need to create a button in Outlook that will open a new message with a stationary preloaded.

Posted on 2003-10-24
1
181 Views
Last Modified: 2010-04-08
I have already started off by using the Visual Basic Editor and creating a Macro. However I think I might have one of 2 problems. Or possibly 2 problems.

First when i try to run my code in Visual Basic Editor in Outlook it tells me that I do not have macros enabled. No i have already gone through and set the security down to the lowest level yet it still does not work.

Secondly I'm not quite sure that my code is executable. This is what I have:

Sub Mailfuse()
  Set myOlApp = CreateObject("Outlook.Application")
  Set objMsg = myOlApp.CreateItem(olMailItem)
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set ts = fso.OpenTextFile("c:\testfile.htm", 1, TristateFalse)
  strText = ts.ReadAll
  objMsg.HTMLBody = strText
End Sub

I am trying to read an HTML message from an already existing HTML source on my hard drive! Please help!
0
Comment
Question by:loureiro
1 Comment
 

Accepted Solution

by:
steve_ldo earned 250 total points
ID: 9616860
Your code looks fine. Have you tried reloading your outlook. Security changes dont take effect until you restart the program.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Get an idea of what you should include in an email disclaimer with these Top 5 email disclaimer tips.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now