View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default How to "wrap" email names in a Macro

Hi James

Add the names to your worksheet
http://www.rondebruin.nl/mail/tips2.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"James" wrote in message ...
A gentleman was good enough to help me with a macro that will open up
Outlook, "grab" a list of names in the macro, attach a file and have it
ready to send out. I use this at work so that everyone does not have to
have the names in a distribution list. The only problem is that the list of
names is growing that we send this to. It is information so that our
vendors and contractors will have the right coding information for
invoices.

My question is, what does one do when you run out of space when adding names
on the line? I thought I read somewhere what to do, but I can't remember
how to do it now. I use the TO, CC and also BCC but it does not offer
enough room.

Any help would be appreciated. Thanks

Sub Send_Paykeys()
Dim objOL As New Outlook.Application
Dim objMail As MailItem

Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)

With objMail
.To =
.CC = ""
.Subject = "Paykeys - AFE Numbers ABE Numbers - Focus Numbers and Job
Work Order Numbers"
.Body = "" & vbCrLf & vbCrLf
.Attachments.Add "\\SERVER\DATA\TCO\GS_Invcs_2006.xls"
.Display
End With

Set objMail = Nothing
Set objOL = Nothing
End Sub