-
word automation
i'd like to open word when i click a button on my .aspx-page
i have 'imports office" at the beginning of my page
this is my subroutine:
ยจ
Code:
Private Sub ButtonBrief_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonBrief.Click
Dim WORDAPP As Word.Application
Dim WORDDOC As Word.Document
'start word and open the document template
WORDAPP = CreateObject("Word.Application")
WORDAPP.Visible = True
WORDDOC = WORDAPP.Documents.Add
end sub
the code executes but nothing happens, i can't find word in the taskmanager either... any ideas?
greetz
Tim
-
i'm sorry, checked again, and WINWORD.EXE is running! (under processes only, not tasks) ...MS word isn't visible though ... can anyone help me? I can't get the automation going and i need to generate a letter from an ASP.NET page....
-
You'll be creating the word document on the server so you won't be able to view it on the client unless you save it and download it to the client.
HTH
DJ
-
any advise on how i could do that ? :confused:
-
Well you'll have to create the word doc blind and then use the SaveAs method to save the created document to the server. You can then just display a link on a page pointing to the path and filename you created.
DJ
-
that's a pretty good idea... that way i don't have to generate it every time it's been requested...
i'll see if i can do it this way...thanx...