Avatar of Mel Brooks
Mel Brooks
 asked on

How to remove all references to 365 on a computer using Access 2010

I have an Access application compiled in 2010.  In one part of the code it opens another database also compiled in 2010 and saved as an accde file.  to open the second application I am using  this approach.
Dim accapp as Access.Application
Set accapp = New Access.Application
accapp.OpenCurrentDatabase PathToAccdeFile

This works well on most workstations on our network, but we have a few where the accde file is attempting to load in Office 365 and we are getting all kinds of errors because 365 isn't fully loaded on that machine and so of  course the user isn't signed into an Office 365 account.
How do I remove all references to 365 so that  Access will load the application in 2010?  The accde file type is already associated with Office 2010.
Microsoft OfficeMicrosoft 365Microsoft Access

Avatar of undefined
Last Comment
Mel Brooks

8/22/2022 - Mon
aravind anche

Daniel Pineault

You could also try an use CreateObject and specify the version to use for the automation

Dim oAccess As Object
Set oAccess = CreateObject("Access.Application.14")
...

Open in new window


You may also like to read over Wayne Philips article How to specify which version of Access to use for OLE automation
Mel Brooks

ASKER
Daniel,
I think your option is going to work and might be  a better option if it will allow for multiple versions of access to remain on the computer.  The code opens the accde fine on my computer, but I can't test it on the computers with the errors until Monday.

-Mel
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Mel Brooks

ASKER
Daniel,
I hope your suggestion would work, but it didn't.


aravind,
I tried the instructions from your link, but under the Settings menu for removing Microsoft Office Desktop, the Uninstall option is greyed out and unavailable.  Keep in mind that this issue is profile specific.  the profile I'm logged in under does not have admin privileges. I did launch a powershell command using admin rights and ran the following  commands which appeared to uninstall the application, but  when the code launched the accde file again, the program tried to load in Office  365 (2016) rather than the default Access version of 2010.

"(Get-AppxPackage -Name Microsoft.Office.Desktop).Dependencies | Remove-AppxPackage"
then
"Get-AppxPackage -Name Microsoft.Office.Desktop | Remove-AppxPackage"
That will typically throw an error if everything is already removed.

Then to verify that it is indeed removed, this command should return nothing.
"(Get-AppxPackage -Name Microsoft.Office.Desktop).Dependencies"
ASKER CERTIFIED SOLUTION
Mel Brooks

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.