I just upgraded to Office 2003 on the client machine and when I try to submit a form that opens a work document, I get an error, "Error: ActiveX component can't create object: 'Word.Application'. Has something changed in Office 2003? My code that used to work is as follows:
TIA
Mike
Code:
Dim oWA
Dim oWD
Dim oTables
Dim oTable
Dim strServerName
set oWA = CreateObject("Word.Application") [COLOR=green]'Here is where I get the error[/color]
strServerName="<%=Request.ServerVariables("SERVER_NAME")%>"
If strServerName = "localhost" Then
Set oWD = oWA.Documents.Open("[URL unfurl="true"]http://localhost/Templates/TrainingSheet.doc")[/URL]
Else
Set oWD = oWA.Documents.Open("[URL unfurl="true"]https://"[/URL] & strServerName & "/Templates/TrainingSheet.doc")
End If
Set oTables = oWD.Tables
Set oTable = oTables.Item(1)
<%=strWordCommands %>
oWA.Visible = True
oWD.UserControl = True
Set oTables = Nothing
Set oTable = Nothing
Set oWD = Nothing
Set oWA = Nothing
TIA
Mike