I borrowed the following code from another thread:
However I get a 'User-defined type not defined' error for the highlighted part. As its Outlook I'm trying to use and our office is standardized with Office 2002, I don't understand why it wouldn't be pre-defined.
In the Access VBA interface I tired to go the reference option to see what is being referenced, but its grayed out.
So I have 2 questions:
1) Can I specifcy the Outlook reference in the code manually?
2) Any suggestions on how to un-gray-out the Reference option under 'Tools'?
Thank you!
***************************************
Have a problem with my spelling or grammar? Please refer all complaints to my English teacher:
Ralphy "Me fail English? That's unpossible." Wiggum
Code:
Private Sub cmdEmailTrackingNumber1_Click()
On Error GoTo Err_cmdEmailTrackingNumber1_Click
Dim strEmail, strBody As String
[highlight]Dim objOutlook As Outlook.Application[/highlight]
Dim objEmail As Outlook.MailItem
However I get a 'User-defined type not defined' error for the highlighted part. As its Outlook I'm trying to use and our office is standardized with Office 2002, I don't understand why it wouldn't be pre-defined.
In the Access VBA interface I tired to go the reference option to see what is being referenced, but its grayed out.
So I have 2 questions:
1) Can I specifcy the Outlook reference in the code manually?
2) Any suggestions on how to un-gray-out the Reference option under 'Tools'?
Thank you!
***************************************
Have a problem with my spelling or grammar? Please refer all complaints to my English teacher:
Ralphy "Me fail English? That's unpossible." Wiggum