Skip to main content
Question

Geeting issue while converting DOCX to PDF

  • April 30, 2026
  • 3 replies
  • 12 views

'File Conversion: DOCX to PDF' forces the Excel app to close. This seems to cause Excel advanced sessions to malfunction such that AA 'thinks' there is still a running/existing session even after closing one.

3 replies

Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+6
  • Automation Anywhere Team
  • April 30, 2026

@omkar.ghag Am I reading this correctly? You’re using EXCEL to convert a WORD document to a PDF? Could you share some code or some background of what and how you’re doing this?


  • Author
  • Cadet | Tier 2
  • April 30, 2026

@Aaron.Gleason, I’m trying to convert DOCX files to PDF in a loop. However, when the “File Conversion: DOCX to PDF” command executes, it closes any Excel file that was opened earlier. Could you please advise if there’s a way to prevent Excel from closing or suggest an alternative approach for the conversion?

 


Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+6
  • Automation Anywhere Team
  • April 30, 2026

@omkar.ghag That’s quite interesting. I can duplicate what you’re seeing. I was able to prevent Excel from closing by making a change to the opened Excel file -- it asked me to save my changes when it tried to close Excel, so I could press Cancel. Not ideal.

I also see that it closes Word. Looking at the package, there are VBS scripts internally that close all these applications. It seems they are being called in error.

Can you rearrange your automation to perform the conversions before or after you’re working with the Excel file? Maybe read the Excel file into a Table and process the Table from memory?

Because you’re using the Community Edition, you cannot contact support and ask for an enhancement request, so you must work around the issue. If your company is using Enterprise Edition, you can contact support and ask this to be updated.