T
ton
Hi,
In VB6 I can create (generate) a word document based upon a template.
- The user click the tempate which I offer in a list
- based on the data he choosed upfront I cabn fill all the bookmarks with
the correct data
- I can save the document I even can print it
some code:
Dim Wordx As Word.Application
Dim thisWord As Word.Document
Set Wordx = CreateObject("Word.Application")
Set thisWord = Wordx.Documents.Add(Template)
' filling the bookmarks something like
Set range = thisWord.GoTo(What:=wdGoToBookmark, Name:=bmbookmark.Name)
If Trim(tekst) <> 0 Then
tekst = Trim(tekst)
End If
range.text = tekst
range.Select
Wordx.ActiveDocument.Bookmarks.Add a, range
and so on at the end:
mydoc="c:\temp\x.doc"
thisWord.BuiltinDocumentProperties(3) = " ton"
thisWord.SaveAs mydoc
easy
But how can it be done in in my webapp. I want to mail the result to the
user, or if possible show it on a webpage, whatever is possible
Can someone explain me how to do this.
Thanx
Ton
In VB6 I can create (generate) a word document based upon a template.
- The user click the tempate which I offer in a list
- based on the data he choosed upfront I cabn fill all the bookmarks with
the correct data
- I can save the document I even can print it
some code:
Dim Wordx As Word.Application
Dim thisWord As Word.Document
Set Wordx = CreateObject("Word.Application")
Set thisWord = Wordx.Documents.Add(Template)
' filling the bookmarks something like
Set range = thisWord.GoTo(What:=wdGoToBookmark, Name:=bmbookmark.Name)
If Trim(tekst) <> 0 Then
tekst = Trim(tekst)
End If
range.text = tekst
range.Select
Wordx.ActiveDocument.Bookmarks.Add a, range
and so on at the end:
mydoc="c:\temp\x.doc"
thisWord.BuiltinDocumentProperties(3) = " ton"
thisWord.SaveAs mydoc
easy
But how can it be done in in my webapp. I want to mail the result to the
user, or if possible show it on a webpage, whatever is possible
Can someone explain me how to do this.
Thanx
Ton