IrishCharm
04-16-2008, 06:50 AM
Hi,
I have the below code which automatically sends an email and attaches a spreadsheet. The problem is that i lose my signature. (i.e. if you open Excel and go file-send to- send as attachment, you have to manually go and add your signature).
Do you know how in my code below i can include for the signature in the file?
All help would be greatly appreaaciated!!!
Sarah
With objOutlookMsg
Do Until ActiveCell = RecipList
ActiveCell.Offset(2, 0).Select
Loop
ActiveCell.Offset(0, 2).Select
If ActiveCell <> "" Then
Do Until ActiveCell = ""
Set objOutlookRecip = .Recipients.Add(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
'' send the message and attachment!!!
If AttachLink = "YES" Then
.Subject = Subject
.Body = Body
.Importance = olImportanceHigh
.ReadReceiptRequested = False
.Attachments.Add WB.FullName
End If
If AttachLink = "NO" Then
.Subject = Subject
.Body = Body
.Importance = olImportanceHigh
.ReadReceiptRequested = False
End If
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
Next
If DisplayMsg Then
.Display
Else
.Send
End If
End If
End With
Set objOutlook = Nothing
Aussiebear: Edited thread to place code in the vba tags.
I have the below code which automatically sends an email and attaches a spreadsheet. The problem is that i lose my signature. (i.e. if you open Excel and go file-send to- send as attachment, you have to manually go and add your signature).
Do you know how in my code below i can include for the signature in the file?
All help would be greatly appreaaciated!!!
Sarah
With objOutlookMsg
Do Until ActiveCell = RecipList
ActiveCell.Offset(2, 0).Select
Loop
ActiveCell.Offset(0, 2).Select
If ActiveCell <> "" Then
Do Until ActiveCell = ""
Set objOutlookRecip = .Recipients.Add(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
'' send the message and attachment!!!
If AttachLink = "YES" Then
.Subject = Subject
.Body = Body
.Importance = olImportanceHigh
.ReadReceiptRequested = False
.Attachments.Add WB.FullName
End If
If AttachLink = "NO" Then
.Subject = Subject
.Body = Body
.Importance = olImportanceHigh
.ReadReceiptRequested = False
End If
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
Next
If DisplayMsg Then
.Display
Else
.Send
End If
End If
End With
Set objOutlook = Nothing
Aussiebear: Edited thread to place code in the vba tags.