| |
chirayu
Posts: 1
Score: 0
Joined: 7/8/2008
Status: offline
|
Hello Friends, I am facing a wierd problem with my VBScript. In my application, I am allowing the user to user to upload Word, PowerPoint and Excel document. Once the document gets uploaded, I am creating a HTML copy of that document using the VBScript. For Word and PowerPoint document, if an HTML copy of the document already exists then no alert message (related to over-writing the existing HTML file) is prompted. However for Excel document, the alert message (related to over-writing the existing HTML file) is prompted if the HTML file for the same exists. The VBScript code snippet which is been used is as follows: if instr(1, existingDocumentPath, ".doc") <> 0 then ' Perform the operations for word document automationObject.activate automationObject.Documents.Open existingDocumentPath automationObject.ActiveDocument.Save automationObject.ActiveDocument.SaveAs newDocumentPath, 8 elseif instr(1, existingDocumentPath, ".ppt") <> 0 then ' Perform the operations for powerpoint document automationObject.Presentations.Open existingDocumentPath, true automationObject.ActivePresentation.SaveAs newDocumentPath, 12 elseif instr(1, existingDocumentPath, ".xls") <> 0 then ' Perform the operations for excel document automationObject.Workbooks.Open existingDocumentPath automationObject.ActiveWorkbook.SaveAs newDocumentPath, 44 end if Please help me by providing any solution to this problem. Thanks in advance Chirayu
|
|