Word Automation Issue

G

Gerardo Venegas

Can not open a word document from an asp page. I already
try these

The error is "Could not open macro storage"

KB Articles
224338
247028
246018 (We unistalled Norton)
257757
244264

The code is as follows, it is in a dll
------------------------------------------
On Error GoTo errHandler
Dim strResult
Const wdFormatHTML = 8
Dim MSWord As Word.Application
Dim Doc As Word.Document
Set MSWord = New Word.Application
Set Doc = MSWord.Documents.Add(strOriPath)
Doc.SaveAs strSAvePath, wdFormatHTML
Set Doc = Nothing
MSWord.Quit False
Set MSWord = Nothing
CreateHtml = strResult
Exit Function
errHandler:
CreateHtml = Err.Number & "-" & Err.Description
Set Doc = Nothing
MSWord.Quit False
Set MSWord = Nothing
----------------------------------------------------
This is the asp code

on error resume next
Dim objWord
Set objWord = CreateObject("OpenWord.clsOpenWord")
strResult = objWord.CreateHtml
("D:\SSOQAwebsite\wwwroot\Policies_Procedures_test\Universa
l.dot", "D:\SSOQAwebsite\wwwroot\Policies_Procedures_test\T
estPP.htm")
Set objWord = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top