J
James
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 = (e-mail address removed);[email protected]
.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
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 = (e-mail address removed);[email protected]
.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