How to Find Dispatch Targets in pywin32

Asked 2 years ago, Updated 2 years ago, 36 views

For example, when I use pywin32 to operate Excel, I think I should do the following.
How do I check the Excel.Application part?

If any application is operational, which string should I use?
How can I find out that?

import win32 com.client
xlApp = win32 com.client.Dispatch("Excel.Application")   

python windows

2022-09-30 14:08

1 Answers

If you can use any app

No, the application side must provide a scriptable object.For Excel, it means Excel.Application.

How do I check the Excel.Application part?

You will be following from the Office VBA reference/Application object.Each of the other applications provides object functionality and, if any, references it.There is no common method.There were some rare things like Apple iTunes (although I couldn't find any official documents right now…)


2022-09-30 14:08

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.