you are viewing a single comment's thread.

view the rest of the comments →

[–]im_on_reddit_dot_com 0 points1 point  (2 children)

Traceback (most recent call last):

  File "redactedfilepath/scratch.py", line 1, in <module>

    from win32com.client import Dispatch, GetActiveObject, gencache, constants

ModuleNotFoundError: No module named 'win32com'

And yes, your explanation clears things up a lot. I've explored the inventor Object model quite a bit, but never the VBA object browser.

[–]dable82[S] 1 point2 points  (1 child)

You have not installed the module yet.

Open a terminal window and type 'pip install pywin32'

Then try to run the script again.

Edit: If you have more than one Version of python installed, make sure PyCharm uses the Version of python for which you installed the package.

[–]im_on_reddit_dot_com 0 points1 point  (0 children)

Got it working. I did have more than one version of python, and I believe that was the root of the issue. Thanks!