Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-04-2011, 12:54 PM   #1
cowboymb
Newly Registered User
 
Join Date: Oct 2011
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
cowboymb is on a distinguished road
Outlook Import

I have created an import of my e-mails in the Inbox. I tested it in a stand alone to make sure I could do it before adding it to my main database. When I added the code to my db it gave me an error of

Compile Error:

user defined type not defined.

Private Function Scanmail(SubjectLine As String)
Dim Inbox As Outlook.MAPIFolder
Dim OlApp As Outlook.Application

I did not get these errors when I had it in a database by itself.

What am I not doing correctly?

Thanks,

Mark

cowboymb is offline   Reply With Quote
Old 11-04-2011, 01:49 PM   #2
Beetle
Duly Registered Boozer
 
Join Date: Apr 2011
Location: Camp Swampy (Denver, CO)
Posts: 1,806
Thanks: 13
Thanked 458 Times in 449 Posts
Beetle will become famous soon enough Beetle will become famous soon enough
Re: Outlook Import

The first thing to check would be your references (in the VBA window go to Tools/References). Make sure you have a reference set to the MS Outlook object library.
__________________
Sean Bailey

Dim Thirsty As String
Thirsty = "Insert Into Glass (Select Beer From Fridge)"
DoCmd.Execute Thirsty, dbPourAnotherOnError
Beetle is offline   Reply With Quote
The Following User Says Thank You to Beetle For This Useful Post:
cowboymb (11-04-2011)
Old 11-04-2011, 06:09 PM   #3
cowboymb
Newly Registered User
 
Join Date: Oct 2011
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
cowboymb is on a distinguished road
Re: Outlook Import

Quote:
Originally Posted by Beetle View Post
The first thing to check would be your references (in the VBA window go to Tools/References). Make sure you have a reference set to the MS Outlook object library.

Thanks!!! It worked. I never turn the Outlook Library off so I don't know why it wouldn't work in both since I created both from scratch.

cowboymb is offline   Reply With Quote
Reply

Tags
access 2010 form , import , outlook 2010

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Import from Outlook Folder gasbored General 2 09-21-2011 06:14 AM
Import Outlook Attachments shamas21 General 0 01-11-2010 03:07 AM
import from access to outlook john151 General 1 06-26-2006 12:28 PM
import access to outlook john151 General 0 06-26-2006 03:23 AM
[SOLVED] Import Outlook E-mails mariosm Modules & VBA 4 11-23-2000 02:51 AM




All times are GMT -8. The time now is 09:06 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World