Solved

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

Posted on 2003-10-24
1
185 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

832 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