Solved

Launch Outlook from form in Access

Posted on 2008-06-12
3
844 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 21773717

    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
ID: 21774413
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
ID: 31466708
You Rock!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 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