Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Outlook email url in body


I am using the below code to send an email based on cell data. however,
I would like to include a url to a directory (eg
\\server\directory\etc.) within the body of the email. Everything I
try is coming out as plain text even though Outlook is set to send as
HTML...


The Outlook 11.0 Object Library is included in "Tools:References"

Sub Send_Msg()
Dim objOL As New Outlook.Application
Dim objMail As MailItem
Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)
With objMail
..To = Sheets("Order").Range("G35").Value
..Subject = Sheets("Order").Range("f3").Value & " " &
Sheets("Job").Range("E6").Value
..Body = "Dear " & Sheets("Job").Range("B8").Value & _
"," & Chr(13) & Chr(13) & "Your production job for " &
Sheets("Job").Range("E6").Value & " for customer: " &
Sheets("Job").Range("I6").Value & " is in progress. " & _
"Your Spec Number is: " & _
Format(Sheets("Order").Range("f3").Value) & "." & Chr(13) &
Chr(13) & "Regards"
..Display
End With
Set objMail = Nothing
Set objOL = Nothing
End Sub

Cheers

Kev


--
kevinho
------------------------------------------------------------------------
kevinho's Profile: http://www.excelforum.com/member.php...o&userid=24984
View this thread: http://www.excelforum.com/showthread...hreadid=399412

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Outlook email url in body


Try

..HTMLBody = "Dear " & Sheets("Job").Range("B8").Value & _
"," & Chr(13) & Chr(13) & "Your production job for " &
Sheets("Job").Range("E6").Value & " for customer: " &
Sheets("Job").Range("I6").Value & " is in progress. " & _
"Your Spec Number is: " & _
Format(Sheets("Order").Range("f3").Value) & "." & Chr(13) & Chr(13) &
"Regards"


--
Ivan F Moala


------------------------------------------------------------------------
Ivan F Moala's Profile: http://www.excelforum.com/member.php...fo&userid=1954
View this thread: http://www.excelforum.com/showthread...hreadid=399412

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Outlook email url in body


Brilliant, I knew it would be something simple...!

Now the only thing I need to do is change the Chr(13) bits to <br
tags, cos they no longer work.

Cheers

Kev

Ivan F Moala Wrote:
Try

.HTMLBody = "Dear " & Sheets("Job").Range("B8").Value & _
"," & Chr(13) & Chr(13) & "Your production job for "
Sheets("Job").Range("E6").Value & " for customer: "
Sheets("Job").Range("I6").Value & " is in progress. " & _
"Your Spec Number is: " & _
Format(Sheets("Order").Range("f3").Value) & "." & Chr(13) & Chr(13)
"Regards


--
kevinh
-----------------------------------------------------------------------
kevinho's Profile: http://www.excelforum.com/member.php...fo&userid=2498
View this thread: http://www.excelforum.com/showthread.php?threadid=39941

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Send a Sheet as body of Outlook Email David Ackerman on cape cod Excel Discussion (Misc queries) 0 March 19th 10 03:11 PM
body of email disappears when I send an email from Excel ~A Excel Discussion (Misc queries) 0 February 25th 05 10:55 PM
Late Binding to Outlook from Excel: Outlook modifies email body Lenny Wintfeld Excel Programming 0 December 12th 04 04:03 PM
How to paste cells from Excel into Outlook email body? stastim Excel Programming 2 August 23rd 04 06:35 PM
Excel within the body of an email McDougle Excel Programming 1 January 20th 04 09:56 PM


All times are GMT +1. The time now is 12:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"