Solved

Launch Outlook from form in Access

Posted on 2008-06-12
3
839 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

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.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

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