I want to run a script in python that would process pdf files - combine them. I started with working with text files. Here is the code in python
with open('example.txt' ,'w') as f:
pass
It just creates a file, if I run it in VS CODE, then everything is ok, but when I try to run the same code in VBA, the file is not created, but the script is executed. Here is the code in VBA
Shell ("python.exe" & "C:\Users\Asus\Desktop\XLS_PDF\main.py" & " " & "-str1 C:/Users/Asus/Desktop/1/TRG.pdf)
For some reason, python does not create or write anything to a file if you run the script through Shell. How do I run a python script in VBA and pass arguments there? It's trite to write the text to a text file that would be specified in the Shell argument
I've already tried triple quotes, running through "VBA.CreateObject("Wscript.Shell")", indicated the full path to python. Nothing helped.
I tried to run the script on the command line as an administrator and already in it the command
py C:\Users\Asus\Desktop\XLS_PDF\main.py
The code is the same as above. It didn't work out(