VBA MS Word - how to save a copy of the current document to a temporary file?
Posted on 2007-03-20
Using VBA withing MS Word (Office 2000 onwards).
I would like to save a temporary copy copy of the current document, which I will later check into Sharepoint 2001 using PKMCDO.
I cannot use:
dim sTempfile as string
sTempFile = "C:/zzz.doc" 'Some example templrary file name
because that changes the current document to be name of the temproray file, and maintains a lonk on the document. I need to save a whole new copy that is avaiable to process using PKMCDO.
Is there a way to do this? Perhaps using the another instance of the word.application object to instantiate another instance of Word, copying the current word object into that instance and then saving that instance? Maybe it is much easier than that!
Any help appreciated.