Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 281
Default How to CC a workbook to a person by VBA

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,
--
Farhad Hodjat
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default How to CC a workbook to a person by VBA

Hi Farhad

Try the Outlook object model examples from my site
http://www.rondebruin.nl/sendmail.htm

Click on the Tip link on each example page



--

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


"Farhad" wrote in message ...
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,
--
Farhad Hodjat

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 281
Default How to CC a workbook to a person by VBA

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 = ; "
.cc = "
.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,


--
Farhad Hodjat


"Ron de Bruin" wrote:

Hi Farhad

Try the Outlook object model examples from my site
http://www.rondebruin.nl/sendmail.htm

Click on the Tip link on each example page



--

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


"Farhad" wrote in message ...
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,
--
Farhad Hodjat


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default How to CC a workbook to a person by VBA

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" wrote in message ...
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 = ; "
.cc = "
.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,


--
Farhad Hodjat


"Ron de Bruin" wrote:

Hi Farhad

Try the Outlook object model examples from my site
http://www.rondebruin.nl/sendmail.htm

Click on the Tip link on each example page



--

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


"Farhad" wrote in message ...
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,
--
Farhad Hodjat


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 281
Default How to CC a workbook to a person by VBA

Thank you Ron I learned very good things in VBA today.
--
Farhad Hodjat


"Ron de Bruin" wrote:

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" wrote in message ...
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 = ; "
.cc = "
.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,


--
Farhad Hodjat


"Ron de Bruin" wrote:

Hi Farhad

Try the Outlook object model examples from my site
http://www.rondebruin.nl/sendmail.htm

Click on the Tip link on each example page



--

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


"Farhad" wrote in message ...
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,
--
Farhad Hodjat


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
how do I calculate the age of a person S Excel Worksheet Functions 5 March 13th 07 08:11 PM
Last person to modify Chip Smith Excel Discussion (Misc queries) 1 June 21st 06 07:22 PM
In a shared workbook, can only one person "accept or reject" chang pama Excel Discussion (Misc queries) 0 September 8th 05 01:45 PM
can only one person accept or reject changes in a shared workbook? pama Excel Discussion (Misc queries) 0 September 7th 05 07:33 PM
How do I calculate the age of a person? Doug Mc New Users to Excel 3 May 2nd 05 10:38 PM


All times are GMT +1. The time now is 02:15 PM.

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

About Us

"It's about Microsoft Excel"