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

Problem when checking emails in Outlook from Access Application

Status
Not open for further replies.

franksirvent

Programmer
Mar 8, 2002
358
GB
Hi there

I get this error while running the following code from Access:
"User type not defined" (more or less, as it has been translated from Spanish)

The code I have copied from one of the examples in this great Forum...Dim ns As NameSpace is the line giving me the problem...any ideas what's wrong ???

Dim ns As NameSpace
Dim Inbox As MAPIFolder
Dim Item As Object
Dim Atmt As Attachment
Dim FileName As String
Dim i As Integer
Dim SubFolder As MAPIFolder

Set myOlApp = CreateObject("Outlook.Application")
Set ns = GetNamespace("MAPI")
Set Inbox = ns.GetDefaultFolder(olFolderInbox)
Set SubFolder = Inbox.Folders("1 ZIP EXTRACTS")

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top