06-28-2006 11:50 AM
Hello,
I have question about emailing a user in Outlook 2000 or 2003 with a PDF file that was from a report generated in Diadem 10. Has anyone ever seen this done before? I need to add this functionality to my current script I developed.
Greg Newsome
Lab Manager/Test Engineer
Email: gnewsome@britaxusa.com
06-28-2006 12:08 PM
Option Explicit
Dim oOutlookApp
Dim oOutlookMail
Dim cnByValue : cnByValue = 1
Dim cnMailItem : cnMailItem = 0
' Get Outlook Application Object
Set oOutlookApp = CreateObject("Outlook.Application")
' Create Mail Item
Set oOutlookMail = oOutlookApp.CreateItem(cnMailItem)
' Set Mail Values
With oOutlookMail
.To = "myname@mydomain.com"
.Subject = "Mail Subject"
.Body = "Mail Body"
' Add Attachement
Call .Attachments.Add( "c:\Attachement.pdf", cnByValue, 1 )
' Send Mail
Call .Send()
End With
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |