i'm trying to get the server-side automation going...Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim oWord As Word.Application Dim oDoc As Word.Document Dim oTable As Word.Table Dim oPara1 As Word.Paragraph Dim oRng As Word.Range Dim oShape As Word.InlineShape Dim oChart As Object Dim Pos As Double 'start word and open the document template oWord = CreateObject("word.application") oWord.Visible = True oDoc = oWord.Documents.Add 'insert a paragraph at the beginning of the document oPara1 = oDoc.Content.Paragraphs.Add oPara1.Range.Text = "Heading 1" oPara1.Range.InsertParagraphAfter() oDoc.SaveAs("C:\\filenaam1.doc") End Sub
i have some questions:
1. when i execute the code the document is saved, but it also generates a shortcut in the same folder!? i want to get rid of it...
2. the winword.exe process is still open...can i kill it?
i really need some help ...




Reply With Quote