Solved

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

Posted on 2003-10-24
1
192 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Mailbox Overload?
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

623 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