|
-
Jul 12th, 2004, 01:46 AM
#1
Thread Starter
Addicted Member
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
never argue with an idiot, he will bring you down to his level and will beat you through experience
-
Jul 13th, 2004, 03:11 AM
#2
Thread Starter
Addicted Member
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....
never argue with an idiot, he will bring you down to his level and will beat you through experience
-
Jul 13th, 2004, 03:29 AM
#3
Frenzied Member
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
-
Jul 13th, 2004, 03:38 AM
#4
Thread Starter
Addicted Member
any advise on how i could do that ?
never argue with an idiot, he will bring you down to his level and will beat you through experience
-
Jul 13th, 2004, 03:42 AM
#5
Frenzied Member
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
-
Jul 13th, 2004, 03:51 AM
#6
Thread Starter
Addicted Member
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...
never argue with an idiot, he will bring you down to his level and will beat you through experience
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|