Solved

Access automation call to Outlook failing

Posted on 2014-08-01
11
227 Views
Last Modified: 2014-08-07
An Access database uses Office Automation to create Outlook emails (using late binding). A client has installed Office 2007 (from disk) onto an Asus Windows 8 machine, and is getting the attached error message. I assume the problem is connected with incompatible dll's, but which ones?

Could running in Windows 8 be a problem? Could automatic updates and/or service packs have created incompatible dll's? Are there any diagnostics I can run?
Capture2.PNG
0
Comment
Question by:slimguy
[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
  • 5
  • 4
  • 2
11 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 118 total points
ID: 40233949
First make sure the target machine is fully updated regarding Windows and Office. This sounds more like a hinky install of Office/Outlook than anything else, so if the update doesn't work, try running a Repair of the Office installation.
0
 

Author Comment

by:slimguy
ID: 40234065
The client has already done an Office Repair - no change.
0
 
LVL 84
ID: 40234153
Can you show the code you're using?

Also - can you verify that you don't have reference issues? A faulty reference can cause lots of troubles - and while you're using Late Binding for this operation, bad references in other libraries can cause Access to choke.
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

Author Comment

by:slimguy
ID: 40234806
Dim objOutlook As Object
    Dim objEmailMessage As Object
    Set objOutlook = CreateObject("Outlook.Application")
    Set objEmailMessage = objOutlook.CreateItem(0)
   
    l_body = "text here"
   
    objEmailMessage.Recipients.Add "sendsms@messaging.intellisoftware.co.uk"
    objEmailMessage.Subject = smsmessage
    'objEmailMessage.BodyFormat = 1 'Plain text
    objEmailMessage.Body = l_body
   
    objEmailMessage.Display
   
    Set objEmailMessage = Nothing
    Set objOutlook = Nothing

The only references are to VB, Access Object Library, DAO 3.6 Object Library, and one other special one. The db usually crashes immediately if any references are missing.
0
 
LVL 31

Assisted Solution

by:Helen_Feddema
Helen_Feddema earned 117 total points
ID: 40234927
The user may have two versions of Office installed, or just have a different version of Outlook.  I have seen this several times.  Automation code is likely to have problems in this situation.  The solution is to uninstall the various Office versions and do a clean install of one version.
0
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 40234942
What is smsmessage?  If it is a variable, it is not set in your code.
0
 

Author Comment

by:slimguy
ID: 40234958
smsmessage is string variable set earler. The code is only a partial extract.
0
 
LVL 84
ID: 40236022
Have you added the database location as a Trusted Location?

Also - where is the database installed on the machine? If you're installing to the Program Files directory, you might be running into permissions issues of some sort. On machines with UAC, you must be sure to install the application into an appropriate directory (and that's not Program Files, since an Access "application" is not an executable). If you think this might be an issue, try moving it to a folder in My Documents, or try creating a directory directly off the root drive (like C:\MyApp)
0
 

Author Comment

by:slimguy
ID: 40237792
It's not in Program Files, it is in a directory off the C drive.
0
 
LVL 84
ID: 40238655
Okay ... but have you added that location as a Trusted Location? 2007 introduced the concept of "Trusted Locations".

See this article for various ways to address that:

http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/A_10805-Overcome-the-Trust-Center-Nuisance.html
0
 

Author Closing Comment

by:slimguy
ID: 40246903
I suspect the problem is probably the result of a faulty Office install, or subsequent updates. Repair didn't work. I have decided to avoid the problem by using CDO instead of Outlook (yes, I now it's a cop-out!).
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
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…

735 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