Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default OutMail Question

Hi Federico

See
http://www.rondebruin.nl/mail/folder3/signature.htm

--

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


"Federico Giuliani" wrote in message ...
Hi i'm using the following sub to create a email with attachments, and its works just fine.

But when i use outlook mine signature appears by itslef, but when i create the mail from excel the signature doesn't appears.

i tried to use .Signature = "name of signature"

but didn't work.

anybody knows how this works?

Thanks!

Sub Enviar_Informe()

Activeworkbook
Dim OutApp As Object
Dim OutMail As Object

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(olMailItem)
'Set OutMail = OutApp.CreateItem(0)

Application.DisplayAlerts = False

ChDir "C:\temp\"
ActiveWorkbook.SaveAs Filename:= _
"C:\temp\Libro.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False

body_str = "Adjunto informe de Producción." & vbNewLine & _
"" & vbNewLine & _
"Saludos" & vbNewLine & _
"" & vbNewLine & _
"Federico"

On Error Resume Next
With OutMail
.To = "produccion"
.CC = ""
.BCC = ""
.Subject = "Informe Diario de Producción"
.Body = body_str
'.Signature = "sin título"
.Attachments.Add ActiveWorkbook.FullName
'You can add other files also like this
'.Attachments.Add ("C:\test.txt")
.Display
End With

ActiveWindow.Close

On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing

Set fs = CreateObject("Scripting.FileSystemObject")
fs.DeleteFile "C:\temp\Libro.xls", force

Application.DisplayAlerts = True

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
Hidden rows automatically unhide when I open Excel Spreadsheet. Rick Excel Discussion (Misc queries) 1 July 19th 06 10:47 PM
Sum only adding rows on page instead of entire spreadsheet - help Sarah Excel Discussion (Misc queries) 1 February 15th 06 11:46 PM
i have rows missing on my spreadsheet but i cannot unhide them? Emma130176 Excel Discussion (Misc queries) 3 August 4th 05 12:53 AM
how do I unhide Excel 2003 spreadsheet rows with usual method. Sandy Excel Discussion (Misc queries) 2 July 13th 05 09:30 PM
Using PROPER for Columns, rows or ENTIRE spreadsheet Tom Excel Worksheet Functions 3 February 4th 05 03:43 PM


All times are GMT +1. The time now is 04:20 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"