Hi, I have a couple of windows applications that use MS Access to print reports. They were built on MS Access 2007, and worked fine until I was forced to upgrade to Office365 and thus MS Access 2016. Unfortunately (apparently) Office365's version of Office 2016 does not allow you to have other Office versions installed, so I had to remove my Access 2007 version. The simplified version of my code that worked fine until now:
Dim oAccess As Access.Application
Dim x As Long
AccessExecutablePath = New FileInfo("C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE").FullName
x = Shell(AccessExecutablePath & " " & Chr(34) & DatabasePath & Chr(34) & " /runtime", AppWinStyle.MinimizedNoFocus)
oAccess = New Access.Application
oAccess = GetObject(DatabasePath)
oAccess.PrintReport("Some_Report_Saved_In_MSACCESS")
Apparently when you install Office 2016, it no longer has the necessary interop driver for Access, and the code no longer works. However, all microsoft's (I suppose outdated) documentation still says to use the code above. Here is my question: Has anyone else faced this issue, and more importantly can anyone suggest a solution, or another method to interact with the Access client? Regards, Johan
My advice is free, and you may get what you paid for.