Can't create an instance
I have a console application and a web application.the web application
call the console application and the console application create an
instance of a MSWORD .it is working fine in visual studio.But when I host
the web app in IIS and try localhost:222 it don't work. here is my code
web app code
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
Dim info = New System.Diagnostics.ProcessStartInfo()
info.FileName="F:\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe"
info.Arguments = TextBox1.Text & " " & TextBox2.Text
info.UseShellExecute = True
Dim process = New System.Diagnostics.Process()
process.StartInfo = info
process.Start()
process.WaitForExit()
End Sub
And the console app code is
Public Sub Main(args As String())
' CREATE AN OBJECT FOR WORD
Dim objWord As Object
objWord = CreateObject("Word.Application")
objWord.visible = True
End Sub
Anybody know what is the problem.
No comments:
Post a Comment