You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think you have create a virtual environment through your pycham during creating your new project but you downloading the module in the existing interpreter.
Go to pycham setting and change virtual environment into existing interpreter.
hi
i have tried a code to convert a word into a pdf andit doesn't work
example
import sys
import os
import comptypes.client
def word_to_pdf (_in, _out):
pdf_format_key = 17
file_in = os.path.abspath (_in)
file_out = os.path.abspath (_out)
worddoc = comtypes.client.CreateObject ( 'Word.Application' )
doc = worddoc.Documents.Open (file_in)
doc.SaveAs (file_out, FileFormat = pdf_format_key)
doc.Close ()
worddoc.Quit ()
destination = sys.argv [ 1 ]
for file in os.listdir (destination):
word_to_pdf (destination + "\" + file , destination + "\" + file + ".pdf" )
after that i run it in the comand prompt for for the file word in the folder specified in his path and it show me this
The text was updated successfully, but these errors were encountered: