Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have seen references to using VBA in Excel to send sheets/books to
recipients. Usually questions are directed to Ron deBruin's site (http://www.rondebruin.nl/cdo.htm). However I have two issues. [1] I am sending using an exchange server and the references are for using SMTP. How is using an Exchange Server different? [2] I'd like to send the file as an attachment but could not find info on how to accomplish this. Should I need go to the Outlook forum? (I want to send the files from within my Excel VBA programming). |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bigfoot17
1: ask your IT department for the server name 2: On the CDO page there is a download with examples -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Bigfoot17" wrote in message ... I have seen references to using VBA in Excel to send sheets/books to recipients. Usually questions are directed to Ron deBruin's site (http://www.rondebruin.nl/cdo.htm). However I have two issues. [1] I am sending using an exchange server and the references are for using SMTP. How is using an Exchange Server different? [2] I'd like to send the file as an attachment but could not find info on how to accomplish this. Should I need go to the Outlook forum? (I want to send the files from within my Excel VBA programming). |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
..
|
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, add references : microsoft outlook xxxx object library if you want to send your shet mail body use this code : Sub mailsend() ' Requires reference to Microsoft Outlook Dim ws As Worksheet, env As MsoEnvelope, mi As MailItem ' Get the active worksheet. Set ws = ActiveSheet ' Save the workbook before mailing as attachment. ws.Parent.Save ' Show email header. ws.Parent.EnvelopeVisible = True ' Get the MsoEnvelope object Set env = ws.MailEnvelope ' Set the email header fields. ' env.Introduction = "Please revew attached file." ' Get the MailItem object. Set mi = env.Item ' Clear the MailItem properties. ClearMessage mi ' Set MailItem properties. mi.Importance = olImportanceHigh ' Set MailItem properties ImportanceHigh. mi.SentOnBehalfOfName = " ' Set MailItem sender if use different sender. mi.To = " mi.CC = " mi.Subject = "Subject text in here" ' Attach this workbook. mi.Attachments.Add "d:\sample.pdf" ''ThisWorkbook.FullName ' Uncomment this to send automatically. mi.Send End Sub and if you want to send your any document, use : mi.Attachments.Add |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Gift Exchange Help! | Excel Worksheet Functions | |||
Exchange Rates | Excel Programming | |||
SQL variable exchange | Excel Programming | |||
how to disable ms exchange as email preference | Excel Discussion (Misc queries) | |||
MS Exchange Macro | Excel Programming |