Macro: Mail attachemnet and text problem

blaksnm

Well-known Member
Joined
Dec 15, 2009
Messages
554
Office Version
  1. 365
Platform
  1. Windows
Hi
I have borrowed this macro from Ron de Bruin (thanks Ron ) to genrate a new ail and a insert default signature.
Problem 1: I have a Range("ExistinFile").value to find and attach corresponding file to the mail
Problem 2: I have 25 celles - named text, text2 .... aso tha should be the text in the mail.
Problem 3: Can I easily format the text in the mail?

I can't come to and end of these problems even after trying a lot.
Can anyone please guide me?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi
I have borrowed this macro from Ron de Bruin (thanks Ron ) to genrate a new ail and a insert default signature.
Problem 1: I have a Range("ExistinFile").value to find and attach corresponding file to the mail
Problem 2: I have 25 celles - named text, text2 .... aso tha should be the text in the mail.
Problem 3: Can I easily format the text in the mail?

I can't come to and end of these problems even after trying a lot.
Can anyone please guide me?

Hi,

I cant see what macro you are referring to, is there an attachment not on here? It would be great if you could post your code.
And its regarding Outlook?

Arithos
 
Upvote 0
Good morning Arithos
Thanks for trying to help:
See macro below

The macro generates a mail inclusive the default Outlook Signature all right, but I want (but don't know how) to attach a file (path-name given as Range("PD_CompleteFileNameExisting").value as well
Would you help me?

Sub Mail_Outlook_With_Signature_Html_1()
' Working in Office 2000-2013
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "Timesheet" & _
"Please see attached TimeSheet issued for comfirmation.<br>"
On Error Resume Next
With OutMail
.Display
.To = Range("PD_CustomerEMAIL").Value
.CC = Range("PD_NymoEMAIL").Value
.BCC = ""
.Subject = Range("Subject").Value
.HTMLBody = strbody & "<br>" & .HTMLBody
'.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub



[h=3][/h]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,812
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top