LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Vba - Generating Micr Outlook Alert from excel

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
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
Can you attach an alert to a date in excel(eg to outlook calendar Total Excel Dunce Excel Discussion (Misc queries) 2 May 31st 07 05:29 AM
how i can take file from adobe reader and make it read with micr. ahmed nasr Excel Discussion (Misc queries) 0 May 25th 06 05:44 AM
How do you add a-z (alphabetically) to your toolbar in micr works Granny Bev Excel Worksheet Functions 3 September 15th 05 10:04 AM
How do I get around the problem where x and y axis labels in Micr. Dixit Dominus Charts and Charting in Excel 1 April 22nd 05 08:11 PM
Micr rob p Excel Programming 0 August 6th 03 08:45 PM


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