Hello,
I have a method which takes various string values to create an
automated email.
Anyone know how I can make a particular string value passed appear in
bold type in the email? ( below, the cboPrio.Text value for example )
Email_AutoSend(sEmailTo, USER.Name, cboPrio.Text )
'calls method...
Public Sub Email_AutoSend(ByVal sTo As String, ByVal sSubject As
String, ByVal sBody as String )
Dim oApp As Outlook._Application
oApp = New Outlook.Application
' Create a new MailItem.
Dim oMsg As Outlook._MailItem =
CType(oApp.CreateItem(Outlook.OlItemType.olMailIte m), Outlook.MailItem)
With oMsg
..To = sTo
..Subject = sSubJect
..Body = sBody
If bAutoSend Then
..Send()
Else
..Display()
End If
End With
End Sub
thanks for any tips,
B 2 4570
You will probably need to send the e-mail in HTML format (or maybe rich text
but I haven't tried that). Something along the lines of:
sHtml = "<HTML>\n" & _
"<HEAD>" & _
"<TITLE>Sample</TITLE>" & _
"</HEAD>" & _
"<BODY>" & _
"<P>" & _
"<STRONG>Bold Text</STRONG></P>" & _
"</BODY>" & _
</HTML>
oMsg.HTMLBody = sHtml;
Hope this helps
Chris.
"yer darn tootin" wrote: Hello, I have a method which takes various string values to create an automated email.
Anyone know how I can make a particular string value passed appear in bold type in the email? ( below, the cboPrio.Text value for example )
Email_AutoSend(sEmailTo, USER.Name, cboPrio.Text )
'calls method...
Public Sub Email_AutoSend(ByVal sTo As String, ByVal sSubject As String, ByVal sBody as String )
Dim oApp As Outlook._Application oApp = New Outlook.Application
' Create a new MailItem. Dim oMsg As Outlook._MailItem = CType(oApp.CreateItem(Outlook.OlItemType.olMailIte m), Outlook.MailItem) With oMsg ..To = sTo ..Subject = sSubJect ..Body = sBody
If bAutoSend Then ..Send() Else ..Display() End If End With End Sub
thanks for any tips, B
You will probably need to send the e-mail in HTML format (haven't tried rich
text).
Something a long the lines of:
sHtml = "<HTML>\n" & _
"<HEAD>" & _
"<TITLE>Sample</TITLE>" & _
"</HEAD>" & _
"<BODY>" & _
"<P>" & _
"<STRONG>Bold Text</STRONG></P>" & _
"</BODY>" & _
"</HTML>"
oMsg.HTMLBody = sHtml;
Hope this helps.
Chris.
"yer darn tootin" wrote: Hello, I have a method which takes various string values to create an automated email.
Anyone know how I can make a particular string value passed appear in bold type in the email? ( below, the cboPrio.Text value for example )
Email_AutoSend(sEmailTo, USER.Name, cboPrio.Text )
'calls method...
Public Sub Email_AutoSend(ByVal sTo As String, ByVal sSubject As String, ByVal sBody as String )
Dim oApp As Outlook._Application oApp = New Outlook.Application
' Create a new MailItem. Dim oMsg As Outlook._MailItem = CType(oApp.CreateItem(Outlook.OlItemType.olMailIte m), Outlook.MailItem) With oMsg ..To = sTo ..Subject = sSubJect ..Body = sBody
If bAutoSend Then ..Send() Else ..Display() End If End With End Sub
thanks for any tips, B
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Quinton |
last post by:
I'm running a website that uses CSS to format the text and a CGI
program Coranto that icludes news updates via SSI. My problem is that
some parts of the CSS don't seem to take effect on the...
|
by: IkBenHet |
last post by:
Hello,
I found this script to create a simple rich text form
(http://programmabilities.com/xml/index.php?id=17):
<html>
<head>
<title>Rich Text Editor</title>
</head>
<body>
|
by: Keith |
last post by:
Hello - this started out as a minor annoyance - and now is
starting to bother me more and more - I'm hoping someone
can help me.
I would like to have a combobox display - NOT initially be
blank...
|
by: Bruce |
last post by:
Hi, there,
I meet a problem about comboBox binding.
--------------------
Database: Northwind
Tables: 1) Products 2) Categories
I create a form (named "form1") to edit the record from...
|
by: dbuchanan |
last post by:
VS2005
I've been reading all the help I can on the topic (MSDN, other) but I
can't make sense of this.
Desired behavior;
The user is to choose from the displayed list of the databound combobox...
|
by: pablorp80 |
last post by:
Hello,
Here is what I need:
I need the focus and the cursor set to a textbox named txtGT, every time no matter if it is the first page load or whether it is a postback.
Here is the problem:
I...
|
by: Mark |
last post by:
I have a table with a field that uses a combobox to populate values. The
Lookup tab within table design mode is the following:
Display Control Combo Box
Row Source Type ...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |