Nov-12-2020, 03:27 PM
(This post was last modified: Nov-12-2020, 03:27 PM by PEGylated_User.)
I have a program that creates label templates in Microsoft Word and I would like the created word document to remain open after the code runs, but it keeps getting shutdown during the python cleanup. How can I exclude Word from the cleanup?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import os, os.path import sys class test(): def start_Word(): os.startfile( 'WordFile' ) test.end() @staticmethod def end(): sys.exit test.start_Word() |