Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Email from Excel....autosignature?


email from excel... autosignature?

Code below will launch an outlook mail message (Outlook 97, not
Outlook Express), and attach the active workbook and other files as
chosen by the user.

My only prob is the generated mail message does not include my
autosignature, whereas normally creating a new mail message directly
in outlook will automatically place the autosignature on the email.

Any ideas on how to get my autosignature to appear on new emails using
code?

tia
steve

Sub sendPack()

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)

Dim VI As String
Dim d As String
Dim esa As String
Dim sendTo As String


VI = ActiveSheet.Range("b6").Value
d = ActiveSheet.Range("d6").Value
esa = ActiveSheet.Range("f6").Value
sendTo = "! NDCG Damage Packs"

rslt = MsgBox("Would you like to attach am Invoice or Plan?",
vbYesNo, "Attach File to Email")
Select Case rslt
Case vbYes
Dim sFileName As String

Dim sFname As Variant
Dim i As Long

sFname = Application.GetOpenFilename( _
FileFilter:="All Files, *.*, Excel Files, *.xl*;*.xls;*.xlt",
_
FilterIndex:=2, _
MultiSelect:=True)

Case vbNo
MsgBox "No files selected"
End Select

With OutMail
.To = sendTo
'.CC = " "
'.BCC =
.Subject = VI & ", Damage " & d & ", " & esa & " exch"
.Body = " "

If IsArray(sFname) Then
For i = LBound(sFname) To UBound(sFname)
.Attachments.Add sFname(i)

Next i
End If


.Attachments.Add ActiveWorkbook.Path & "\" &
ActiveWorkbook.Name
.Display
'.Send

Set OutMail = Nothing
Set OutApp = Nothing

End With

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Email from Excel....autosignature?

Hi Steve

Not possible as far as I know.
You can add it in the Body if you want

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


"Steve" wrote in message ...

email from excel... autosignature?

Code below will launch an outlook mail message (Outlook 97, not
Outlook Express), and attach the active workbook and other files as
chosen by the user.

My only prob is the generated mail message does not include my
autosignature, whereas normally creating a new mail message directly
in outlook will automatically place the autosignature on the email.

Any ideas on how to get my autosignature to appear on new emails using
code?

tia
steve

Sub sendPack()

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)

Dim VI As String
Dim d As String
Dim esa As String
Dim sendTo As String


VI = ActiveSheet.Range("b6").Value
d = ActiveSheet.Range("d6").Value
esa = ActiveSheet.Range("f6").Value
sendTo = "! NDCG Damage Packs"

rslt = MsgBox("Would you like to attach am Invoice or Plan?",
vbYesNo, "Attach File to Email")
Select Case rslt
Case vbYes
Dim sFileName As String

Dim sFname As Variant
Dim i As Long

sFname = Application.GetOpenFilename( _
FileFilter:="All Files, *.*, Excel Files, *.xl*;*.xls;*.xlt",
_
FilterIndex:=2, _
MultiSelect:=True)

Case vbNo
MsgBox "No files selected"
End Select

With OutMail
.To = sendTo
'.CC = " "
'.BCC =
.Subject = VI & ", Damage " & d & ", " & esa & " exch"
.Body = " "

If IsArray(sFname) Then
For i = LBound(sFname) To UBound(sFname)
.Attachments.Add sFname(i)

Next i
End If


.Attachments.Add ActiveWorkbook.Path & "\" &
ActiveWorkbook.Name
.Display
'.Send

Set OutMail = Nothing
Set OutApp = Nothing

End With

End Sub



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
send email to each customer email in excel sheet. -keevill- Excel Discussion (Misc queries) 3 July 17th 08 02:33 PM
Email addresses in Excel need to format for mass email Boomer Excel Worksheet Functions 1 June 9th 06 01:46 PM
Email editor closes when forwarding Excel-embedded email Bambina Setting up and Configuration of Excel 0 March 16th 06 10:45 PM
working on excel document in email saved changes in email not in . butter Excel Discussion (Misc queries) 2 February 20th 06 09:25 AM
Outlook AutoSignature Andrew[_40_] Excel Programming 1 April 21st 04 02:02 PM


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

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

About Us

"It's about Microsoft Excel"