Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ajliak,
modify the code below: Function SendMail(EmailAddressTo, EmailAddressBCC, BodyText, FileToAttach, Optional AttachmentTitle, Optional CounterNo, Optional MessageTitle) Dim myOlApp, MyItem, myAttachment Set myOlApp = CreateObject("Outlook.Application") Set MyItem = myOlApp.CreateItem(olMailItem) With MyItem .To = EmailAddressTo .BCC = EmailAddressBCC .Subject = MessageTitle ' & " - CounterNo " & CounterNo .Body = Chr(13) & Chr(13) & BodyText End With 'myItem.Display On Error Resume Next If FileToAttach < "" Then Debug.Print "FileToAttach: " & FileToAttach & " - AttachmentTitle: " & AttachmentTitle & " - CounterNo " & CounterNo Set myAttachment = MyItem.Attachments myAttachment.Add FileToAttach, , 2, AttachmentTitle End If With MyItem '.Send .Save .Close '.MoveTo MyOutBoxFolder ' another function End With DoEvents Sleep 500 Set myOlApp = Nothing Set MyItem = Nothing Set myAttachment = Nothing MoveToOutBoxFolder ' another function End Function "ajliaks " wrote in message ... Hi all, It may be simple, but I have no idea how to do this! Could somebody help, please? From excel macro, I need to generate event in Microsoft Outlook, e.g.: If today=12-08-2004 then Outlook.task = "Make a cake" Outlook.Note="Happy birthday" Outlook.Calendar=Appointment in place... at 15.30 hs end if Any help will be really appreciate! Aldo. --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can you attach an alert to a date in excel(eg to outlook calendar | Excel Discussion (Misc queries) | |||
how i can take file from adobe reader and make it read with micr. | Excel Discussion (Misc queries) | |||
How do you add a-z (alphabetically) to your toolbar in micr works | Excel Worksheet Functions | |||
How do I get around the problem where x and y axis labels in Micr. | Charts and Charting in Excel | |||
Micr | Excel Programming |