Link to home
Start Free TrialLog in
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.
Avatar of aravind anche
aravind anche
Flag of United States of America image

Avatar of Daniel Pineault
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
Avatar of Mel Brooks


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.

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

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"
"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"
Avatar of Mel Brooks
Mel Brooks

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial