简体   繁体   中英

No error for wrong path when calling SaveAs2 VBA/Word 2013 with OLE

Situation: From Visual Foxpro 9 I make a document in Word by means of OLE (COM). Functioned for the past years. Moved to new PC (W7Pro) and to Word 2013. In the runtime version the oWord.SaveAs2(...) is skipped without any error. In the development version it functioned ok.

By moving the SaveAs2 inside Word I got an error and it turned out to be an error in the path, because the mem-file where the path was stored was not transfered correctly in the runtime version.

Took about 8 hours. I know this is not a question, but would like to report it anyway.

During this process I couldn't find a way to get parameters passed from VFP9 to a function or sub in normal.dotm with the .run method. Only could call a sub without parameters.

Situation: From Visual Foxpro 9 I make a document in Word by means of OLE (COM). Functioned for the past years. Moved to new PC (W7Pro) and to Word 2013. In the runtime version the oWord.SaveAs2(...) is skipped without any error. In the development version it functioned ok.

By moving the SaveAs2 inside Word I got an error and it turned out to be an error in the path, because the mem-file where the path was stored was not transfered correctly in the runtime version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM