troubleshooting Question

Excel macro in an XLS file to export to PDF says "The object invoked has disconnected from its clients" for one user on multiple computers

Avatar of realtimer
realtimer asked on
PDFMicrosoft ExcelMicrosoft Office
2 Comments1 Solution14 ViewsLast Modified:
I have posted this last month and stated that the solution was local PC user profile rebuild. However, the issue returned even after a second user profile rebuild and I found out that it is not limited to one PC.

We have an XLS file (not xlsm) saved in a network location with a button connected to a macro that exports the contents of a worksheet to a PDF file. It works for all users and their respective PC's. However, for one user (User2 to follow previous post) it shows the error message included in the summary on her PC (PC2) and on other PC's.  Other users can log onto PC2 and they do not have the issue. I have tested the export target as a mapped drive letter (which is the original), as a UNC path, and tested exporting to C drive and all failed. It is not a permission issue as User2 can write to the target. User2 can also manually export to PDF. The PC's have Windows 10 Professional and have the same version of Office via Office 365.

Below is the snippet from the macro code and the error occurs at  "ActiveSheet.ExportAsFixedFormat" line

    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
    "T:\folder\path\export.pdf" _
    , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
    :=False, OpenAfterPublish:=True

The PC's are in an Active Directory domain environment and the target is a share on the file server.
Has anyone seen such issue?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros