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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create outlook e-mail, windows 8.1, outlook 2013

Status
Not open for further replies.

Blorf

Programmer
Dec 30, 2003
1,608
US
The following code has worked for me for years. Today a new condition. An employee is using his shiny new computer with windows 8.1, outlook 2013, and Access Runtime 2007. The code runs, and gives no errors, but fails to generate and display an e-mail in outlook. One thing to note, another person has the same setup, but has Access 2013 and it does work. Any advice for my Runtime users would be appreciated.

Dim objOutlook As Object 'Outlook.Application
Dim ItmNewEmail As Object 'Outlook.MailItem
Dim OutputFileName As String

Set objOutlook = CreateObject("Outlook.Application")
Set ItmNewEmail = objOutlook.CreateItem(olMailItem)

With ItmNewEmail
.To = "Blah@Blah.com"
.CC = "Hello@There.com"
.Subject = "Cash Report " & Format(Me.CashDate, "YYYY-MM-DD")
.Body = X
.Attachments.Add "C:\accounting\banking\Cash Report " & Format(Me.CashDate, "YYYY-MM-DD") & ".PDF"
.Display
End With

Thanks,
ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top