ChandanD
5 years agoContributor
Error while creating word document using Sys.OleObject
Hello,
I am unable to create a word document and open the word document. I am adding error message of
Sorry, we couldn't find your file. Was it moved, renamed, or deleted?
(C:\KBData\...\Win10\Word_test.docx)
(C:\KBData\...\Win10\Word_test.docx)
This is the code which I am using.
function worddoc ()
{
Word = Sys.OleObject("Word.Application")
Word.Visible = true
Word.Documents.Open("C:\\KBData\\Training_svn\\trunk\\Win10\\Word_test.docx")
Word.Documents.Add()
// oWord.Documents.Close()
// oWord.Quit()
}