Solved

Launch Outlook from form in Access

Posted on 2008-06-12
3
833 Views
Last Modified: 2013-11-29
I'm trying to launch Outlook from a form within Access, can can't get the VBA code right.
Also, I'm trying to open the calendar and tasks in new windows.

Here is some sample code I was invoking from a button control on an Access form, but I'm getting an "could not complete the operation. One or more parameter values are not valid" error.

Any help you could provide would be greatly appreciated.

Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNameSpace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(olFolderInbox)
myFolder.Display
Set myOlApp = CreateObject("Outlook.Application")

Set myNameSpace = myOlApp.GetNameSpace("MAPI")

Set myFolder = myNameSpace.GetDefaultFolder(olFolderInbox)

myFolder.Display

Open in new window

0
Comment
Question by:Dfunkt
3 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
Comment Utility

    Dim oOutlook As Object
    Dim oNameSpace As Object
    Dim oInbox As Object
     
    Set oOutlook = CreateObject("Outlook.Application")
    Set oNameSpace = oOutlook.GetNamespace("MAPI")
    Set oInbox = oNameSpace.Folders(1)
     
 
    Set oInbox = oInbox.Folders("Inbox")
    oInbox.Display
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
Dfunkt,

<Off Topic>

Again, why is this question not linked to the Outlook zone?
I thought that is what happened to the other Q?

I mean I thought that was the reason you closed the other Q?

I am sure that Cap has your answer here.

I'm just curious as to why you would close one "Outlook related" question. (That was not linked to the outlook Zone)
Only to open another "Outlook related" question. (That was not linked to the outlook Zone)
?
:-O

JeffCoachman
0
 

Author Closing Comment

by:Dfunkt
Comment Utility
You Rock!
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now