Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook VBA ? How to find/progam following code... ?

Status
Not open for further replies.

Viko

MIS
Oct 29, 2002
2
US
Hi there !

I'm searchin for vba/vb source code to send outlook tasks from my own program !!!

example: I have program for customer management and want to send a more difficult problem to another person as an OUTLOOK tast.

I am using OUTLOOK 97, but if there's a change to OUTLOOK 2000 please tell me also. (not urgent)

If anybody could help me, i would be very pleased :)

thx viko
 
Hello viko

If you are using Word VBA you could use code along the lines of the following:

Options.SendMailAttach = True
ActiveDocument.SendMail

this will simply attach the document as an attachment leaving you to fill in the details. If you require something that automatically fills in an email address, subject line and some body text then you need to use something like:

Dim objMail As Object
Set objMail = objOutlook.CreateItem(olMailItem)
With objMail
.Subject = "Whatever"
.to = "Whoever"
.Body = "Whatever"
.Display
End With

Finally you can also display the Select Names dialog box for the active e-mail message.

Application.MailMessage.DisplaySelectNamesDialog

Hope that this gives you something to start with

Asjeff
 
Hi viko,

As asjeff illustrates, it's not difficult automating Outlook. You'll find several examples at
Here's a brief sample of what I believe you are wanting:

Set oOutlook = CreateObject("Outlook.Application")
Set oTask = oOutlook.CreateItem(3)
oTask.Assign
oTask.Recipients.Add "Joe Blow"
oTask.Subject = "Get my coffee."
oTask.Importance = 2
oTask.DueDate = Now
oTask.Send Jon Hawkins
 
lot of thx to u both... :)

i will try to use your help !

viko
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top