简体   繁体   中英

Send Email from MS Project via Outlook

I am trying to open and populate emails from MS Project via Outlook. I have done this before from Excel, but when I drop the code into Project I get an error.

'Create and Set New Mail Item
Dim OutlookApp As Outlook.Application
Set OutlookApp = CreateObject("Outlook.Application")

Dim OutlookMail As Outlook.MailItem
Set OutlookMail = OutlookApp.CreateItem(OutlookMailItem)

The error triggers on the Dim OutlookApp line and reads, 'User-Defined Type Not Defined'

What am I forgetting here?

I'm not sure I understand the requirement, so I'm sending a blind shot. In Project 2007 you'll see a combo box at the top right of the screen, probably defaulting to "All Tasks". Choose the date range you want with the info you need and send this to your team along with any encouraging words that you need to motivate them.

Will this help?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM