We help IT Professionals succeed at work.

MS Access Error

al4629740
al4629740 asked
on
25 Views
Last Modified: 2020-05-06
I have an access program that I am trying to open from a different computer with a more updated version.  It seems like my first error (attached) is that it cant find WinWord when starting the program.  This error occurs when I open Access for the first time on the new computer.  The question I have is how can I fix this error by telling the program where MS Word is located?

error.png
Comment
Watch Question

CERTIFIED EXPERT

Commented:
You need to set this as a trusted application through the Menu. Find the Access File menu (when you are open - choose Options and then Trust Centre, and then click the Trust Centre Settings button. Set the trusted locations for your MS Access location and those of the databases that you open.

Close and restart Access

Kelvin
John TsioumprisSoftware & Systems Engineer
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
I guess a way is to parse registry for locating winword : https://www.actualinstaller.com/help/winword.html
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe
To read the registry : https://docs.microsoft.com/en-us/dotnet/visual-basic/developing-apps/programming/computer-resources/how-to-read-a-value-from-a-registry-key
Now 2 questions arise..
1. You need probably VBA to do it ...i am not sure if you can implement it on Macro Level
2. Why use such kind of early early binding...just start your application and use late binding to use the Word functionality..you can check the installation presence like this
Dim obj As Object
    Set obj = CreateObjectType("Word.Application")

    If Not obj Is Nothing Then
     'You have Word so use late Binding to work with it
      set obj = Nothing
    else
      ' Not Installed
     End If

CERTIFIED EXPERT
Most Valuable Expert 2015
Distinguished Expert 2018

Commented:
Try to replace the direct call with a more generic:

Start Winword

Open in new window

Author

Commented:
How can I find where this code is being ran to make the change.  I opened the VB editor but I'm thinking there are some startup properties where this can be found.  As I search for anything that says RunApplication or AutoExec, I don't see it.   I'm not the best at Access so any more detail would help.  
CERTIFIED EXPERT

Commented:
If a macro is called Autoexec, it will run on startup automatically. Holding down Shift while starting Access bypasses that. If you don't want it to run at all, rename the Macro to something else, and call it when you need it.


Kelvin

Author

Commented:
That works, but when I go to tools and macros to find the Autoexec macro, I don't see it.  Even when I look in the VB Projects window I don't see that Macro
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT

Commented:
The shutter bar is also called the Navigation Pane.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.