I have a .dot Word template and am trying to insert a Paragraph using ASP VBScript. So far I have been successful with:
1) Create a Document and DocumentBuilder object
2) Used the Clone method to load my .dot Word template
3) Scan through the Word template for Bookmarks and insert data from a SQL database
Now I would like to create a simple Paragraph and insert it into the Word template, but have been unsuccessful. The ASP page takes a while to load then nothing happens. The page is blank and there are no error messages generated.
Here is the code I am using to to create and insert a Paragraph:
dim oSection, oBody, oParagraph, oRun
set oDoc.Section = oSection
set oDoc.Body = oBody
set oDoc.Paragraph = oParagraph
oParagraph.LeftIndent = 2
set oDoc.Run = oRun
oRun.Text = "Hello World!"
Is this the right way to go about it? I am following the sample code from the API on your website.