473,387 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how can I force a new outlook mailitem to open in the Outlook HTML editor but not the Word editor?

I am using the following code. When outlook opens the message and the
Outlook HTML editor is the default editor, there is no problem. If Word is
the default editor, however, it butchers up the HTML and the message looks
like crap. How can I force the message to open in the Outlook HTML editor?

Thanks,
Scott

Dim myOlApp As Object
Const olMailItem As Integer = 0
Dim ns As Object
Dim folder As Object
Dim myItem As Object
myOlApp = CreateObject("Outlook.Application")
myItem = myOlApp.CreateItem(0)
With ne
HTML = [String].Format(strHTML, _
.NameFirst.Text, _
.nameLast.Text, _
.address1.Text, _
.Address2.Text, _
.City.Text, _
.state.Text, _
.Zip.Text, _
.phoneEve.Text, _
.phoneDay.Text, _
.Email.Text, _
.ddItems.Text, _
.old_refid.Text, _
strComments, _
.datecode.Text, _
.doc.Text, _
.ddCallType.SelectedItem.text, _
.ddResolution.SelectedItem.text, _
.ddDisposition.SelectedItem.text, _
.txtOrderId.Text, _
.dop.Text, Comments.Text)
End With
myItem.HTMLBody = HTML
myItem.BodyFormat = 2
myItem.To = Me._To.Text
myItem.Subject = "Applica Contact Manager Record"
myItem.Display()

--
Scott Emick
Web Programmer
Fox International
Remove the ham from mail address if it's not spam
Nov 21 '05 #1
1 2297
Scott,

For me this sounds if you will create the next to resolve bug. The user has
set his settings to use Word as mailagent and will with your program maybe
call Microsoft why that is not working?

In my opinion is the programmer of an application not the one who decide
what maileditor the user has to use, that he decide himself of company rules
say that it only has to be Outlook and than you have no problem.

I think that you only can give him an advice to use Outlook.

(What I don't understand as well is why a user has to see a message in a
message format what he cannot change, because he is not used to the tool you
give him)

However just my thought,

Cor
I am using the following code. When outlook opens the message and
the Outlook HTML editor is the default editor, there is no problem. If
Word is the default editor, however, it butchers up the HTML and the
message looks like crap. How can I force the message to open in the
Outlook HTML editor?

Thanks,
Scott

Dim myOlApp As Object
Const olMailItem As Integer = 0
Dim ns As Object
Dim folder As Object
Dim myItem As Object
myOlApp = CreateObject("Outlook.Application")
myItem = myOlApp.CreateItem(0)
With ne
HTML = [String].Format(strHTML, _
.NameFirst.Text, _
.nameLast.Text, _
.address1.Text, _
.Address2.Text, _
.City.Text, _
.state.Text, _
.Zip.Text, _
.phoneEve.Text, _
.phoneDay.Text, _
.Email.Text, _
.ddItems.Text, _
.old_refid.Text, _
strComments, _
.datecode.Text, _
.doc.Text, _
.ddCallType.SelectedItem.text, _
.ddResolution.SelectedItem.text, _
.ddDisposition.SelectedItem.text, _
.txtOrderId.Text, _
.dop.Text, Comments.Text)
End With
myItem.HTMLBody = HTML
myItem.BodyFormat = 2
myItem.To = Me._To.Text
myItem.Subject = "Applica Contact Manager Record"
myItem.Display()

--
Scott Emick
Web Programmer
Fox International
Remove the ham from mail address if it's not spam

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: MaxH | last post by:
I need to perform programmatically from a C# .net application the following tasks: _ open an outlook (or default e-mail client) compose message window; _ attach a document to the new message; _...
2
by: Lauren Quantrell | last post by:
Using Outlook Automation, is there a way to insert a graphic in the body of an e-mail so that it appears at the top of an email? lq
9
by: John | last post by:
Hi I am using the following code to search for an email message with id myID; Dim SentFld As Outlook.MAPIFolder Dim Email As Outlook.MailItem Dim I As Integer OutlookApp = New...
10
by: John | last post by:
Hi When I open a new outlook email from vb.net, sometimes outlook is very slow to appear or occasionally outlook freezes completely. I am targeting mixed office2000/xp environments so I am...
2
by: John | last post by:
Hi I am trying to find the way to create an email in outlook. I am using the code given at the end. It works fine the first time but calling the code second time gives the following error; ...
8
by: Li Pang | last post by:
Hi, I used following codes to pass a message item from CDO to Outlook. They worked fine when I used outlook 2000, but get an error of "Specified cast is not valid." when I used Outlook 2003....
2
by: Pieter | last post by:
Hi, I'm using a thight integration with Outlook 2003 (with an Exchange server) in my VB.NET (2005) application. Until now I'm using the Outlook Object Model, but it appears to be very slow, and...
3
by: Jeff | last post by:
I am trying to send emails from my application (not using a plugin, that will come later), I can create an email and add attachments. I can fill in the body etc. Word works for the editor. So...
7
by: Dean Spencer | last post by:
Can anyone help? I am importing Emails from Outlook using the following code: Public Function ScanInbox(SubjectLine As String) Dim TempRst As Recordset Dim OlApp As Outlook.Application Dim...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.