How to CC a workbook to a person by VBA

G

Guest

Hi,

i need to send a workbook to multiple persons and also CC to multiple
persons either in my VBA code.

any helps would be much appriciated.

Thanks,
 
G

Guest

Thank you Ron,

I put the code:

Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = "(e-mail address removed); (e-mail address removed)"
.cc = "(e-mail address removed)"
.Subject = BTNum & "-" & Trim(Str(Range("qty").Value)) & "
Pieces (invoice#" & InvNTxBx.Value & ")"
.Body = "Hi Bruce,This is invoice for today.Thanks &
Regards,Farhad"
.Attachments.Add ("F:\USERS\accounting\EXCEL" &
Trim(Str(Val(Right(InvDTxBx, 4)))) & "\Toshiba\Toshiba " &
Trim(Str(Val(Left(InvDTxBx, 2)))) & "\" & Crtra)
.Display 'Or use Send
End With

Set OutMail = Nothing
Set OutApp = Nothing
With Application
.EnableEvents = True
.ScreenUpdating = True
End With

but the .Body = "Hi Bruce,This is invoice for today.Thanks & Regards,Farhad"
part in the email shows like: Hi Bruce,This is invoice for today.Thanks &
Regards,Farhad
and i wand it shows like:
Hi Bruce,

This is invoice for today.

Thanks & Regards,

Farhad

can anybody help me to do this?

Thanks alot,
 
R

Ron de Bruin

Hi Farhad

Like I said, click on the tip link on each page
http://www.rondebruin.nl/mail/tips2.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


Farhad said:
Thank you Ron,

I put the code:

Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = "(e-mail address removed); (e-mail address removed)"
.cc = "(e-mail address removed)"
.Subject = BTNum & "-" & Trim(Str(Range("qty").Value)) & "
Pieces (invoice#" & InvNTxBx.Value & ")"
.Body = "Hi Bruce,This is invoice for today.Thanks &
Regards,Farhad"
.Attachments.Add ("F:\USERS\accounting\EXCEL" &
Trim(Str(Val(Right(InvDTxBx, 4)))) & "\Toshiba\Toshiba " &
Trim(Str(Val(Left(InvDTxBx, 2)))) & "\" & Crtra)
.Display 'Or use Send
End With

Set OutMail = Nothing
Set OutApp = Nothing
With Application
.EnableEvents = True
.ScreenUpdating = True
End With

but the .Body = "Hi Bruce,This is invoice for today.Thanks & Regards,Farhad"
part in the email shows like: Hi Bruce,This is invoice for today.Thanks &
Regards,Farhad
and i wand it shows like:
Hi Bruce,

This is invoice for today.

Thanks & Regards,

Farhad

can anybody help me to do this?

Thanks alot,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top