Is it possible to run a macro in Outlook from Acces and if so, how (link, explination, or book suggestions)? I've tried MAPI to no avail although i'm open to trying it again with new information.
5 3512 NeoPa 32,556
Expert Mod 16PB
Although I know little to nothing about the Outlook API, you can use Application Automation to control it.
Thank you for the response, NeoPa. However, I've practically written the book on Application Automation^.^ (No seriously... note that I wrote the code in the post you linked too:-)
The problem I am running into is that whenever access attempts to send an e-amil through outlook using an object reference to the outlook application, a dialog box pops up and takes about 4 seconds before it will allow one to click yes to send the e-mail. This happens even if the code is signed with a cirtificate marked as trusted on the computer running the code.
I do not know if it is possible, though, to call a macro in one Office application from another Office application (specifically in Outlook from Access). If this were possible, this limitation could be worked around by calling a macro to send e-mail in Outlook from within Access.
I've tried using the MAPI interface but it just tells me that the macro I am calling doesn't exist within Outlook. I've also tried to write an application in Java that would do the same and I get the same effect.
If this is not possible, I will likely use a program call Express ClickYes that clicks the yes button for the user, but I would prefer a slightly more robust and in-house solution to the problem^.^
NeoPa 32,556
Expert Mod 16PB
Ooops :Red Face:
Yes, I had forgotten that the extra code in there was your contribution.
What is it in Outlook that you're trying to call from within Access?
Although I'm utterly ignorant of the Outlook API, I do know that certain things will only work from outside automation when referred to explicitly. That is, when running from the application they're designed for there are shortcuts that you get used to using. When controlling from another application, these shortcuts are typically unavailable so you would need to be more specific in any such references.
One of those aha moments just hit me. I've been trying to write the Outlook VBA in a separate module. The issue is that Outlook treats the module code as external to Outlook itself so one cannot call the macro from within Access or Word or any other application.
However, if you put the code in the default "ThisOutlookSession" module created by Outlook, it is possible to call the vba functions using the MAPI interface.
I cannot take credit for this discovery, however. This page here lead me to the solution should anyone else need to solve this particular problem. http://www.everythingaccess.com/tuto...curity-Warning NeoPa 32,556
Expert Mod 16PB
That looks pretty handy :) I particularly like the "VBA within Outlook" approach.
Unfortunately, We mostly use Outlook 2000 at work at the moment :(
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Aprochko |
last post by:
Attempting to access outlook from C# .NET ASP app. Have added reference to
COM Microsoft Outlook 11 Object Library. Have included
using System.Runtime.InteropServices;
using System.Web.Mail;...
|
by: MLH |
last post by:
Is the following remotely correct?
=DDE("C:\Program Files\Program Files\Outlook
Express\OEmig50","Attachment","Name")
I'm not sure that OEmig50.exe is the executable
for OE. Anybody know?
...
|
by: Greg |
last post by:
Can any one point me in the right direction.
I want to be able to , with in MS Access , send a email using OUTLOOK.
In other words , have a button on a menu that i click on which starts up...
|
by: PerryC |
last post by:
Is there anyway to add in the code to open up MS Outlook instead of
Outlook Express during an SendObject Command in MS Access 2002? (Add
some code in the module?)
Sincerely,
perry
|
by: Bob |
last post by:
Hi Everybody
A tough one!!!
Is there any way that incoming eMails (MailItems) into Ms Outlook can be used to automatically
create records in a ms Access table or sub table.
Smiley Bob
|
by: WindAndWaves |
last post by:
Hi Gurus
I have recently discovered references in the VB section of MS Access,
however, when choosing references, I noticed that there are more than who
knows how many options. How and/or where...
|
by: Salad |
last post by:
A2003, WinXP
I know it is possible to link the Outlook contacts table to Access. Is
it possible to call/open the Outlook Contacts window form within Access?
|
by: Midas NDT Sales |
last post by:
Hi,
I am trying to start a database that uses contact details from my Outlook
contacts information. Can anyone suggest how to look up all records in the
Outlook contacts and make a table in...
|
by: rdemyan |
last post by:
My app creates a building report.
My users have requested that I provide functionality to e-mail these
"building reports" to building managers once a month.
So assuming that I have the...
|
by: madihamir |
last post by:
Iam new to .net and have gotten assignment for make the class library to automate the outlook
I have tried to done it but i've to make the Handlers also .
Detecting an methods for receiving and...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |