I'm running Word from VFP and I am attempting to change the default directory the users will retrieve and create Word documents in to be C:\AUDITS. I'm using the following code, but I keep getting an error (OLE error code 0x80020006:unknown name). Does anyone know what's wrong or a better way to do this?
*start Word
oWord = CreateObject('Word.Application')
*change default file path for Word
oWord.defaultfilepath = "c:\audits"
*show Word to the user
oWord.Visible = .T.
*start Word
oWord = CreateObject('Word.Application')
*change default file path for Word
oWord.defaultfilepath = "c:\audits"
*show Word to the user
oWord.Visible = .T.