Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2003-10-24
1
Medium Priority
?
196 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 1000 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article lists the top 5 trialware OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their Exchange server is no longer available or other critical issues with Exchange server or impo…
If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
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…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

773 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