Skip to content

Identical: Attribute.Error : Word.Application.Documents #37 #109

Description

@duaneellissd

I too am getting this:
#37

I just installed from "pip" about 3 hours ago (1/30/2025) -

Not sure of the version I am using,
if I use: print(docx2pdf.version) = it says: 0.1.8

This problem occurs RANDOMLY - if I run again - it seems fine.

What I think might be related to the problem:

Background:

is a long time ago I did alot of VB SCRIPT with Excel an Salesforce reports.
(I was converting sales force customer support reports into a highly colorized Excel workbook)

The DDE exchange with Excel would sometimes fail - expecially when it was opening or closing or shutting down.
What was happening was this:
If I have lots of things active - Excel would take a long time to shut down.
If I had minimal things active - Excel would shut down so quick that other things had not completed.

I chalked it up to a "race condition" when using EXCEL from VB Script... It was a very elusive problem - I did this:
Catch the error - sleep and try again - if it failed 3 times I died with a horrible error.

That race condition may be the actual root of this problem -
It took me about 6 months to put enough sheilding around that part of the VB Script
(it also happened on startup ... many things with Excel where asynchronous in bad ways)
but it worked. a royal pain in the ass. I grew to hate vbscript with a passion.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions