
ASP, Word, Client Side vbScript
I posted this before but most of my posting was omitted. I'll try again.
I am opening a new word document from an ASP Page using Client Side vbScript.
Here is the code. Everything works fine except the lines that start
.ParagraphFormat.Alignment = wdAlignParagraphCenter
This is supposed to put the text centered. The font and size are OK.
the .TypeParagraph puts a hard return in. The font and size changes are OK. The
line which starts
.TypeText "<%=cProjName%>" works fine, getting the value of cProjName.
Dim objWord
Set objWord = CreateObject("Word.Application")
Dim MyDoc
Set MyDoc = objWord.documents.Add
objWord.visible = True
with objWord.Selection
.ParagraphFormat.Alignment = wdAlignParagraphCenter
.TypeParagraph
.Font.Name = "Arial"
.Font.Size = 16
.TypeText "Acquistion Plan"
.TypeParagraph
.TypeParagraph
.ParagraphFormat.Alignment = wdAlignParagraphLeft
.Font.Name = "Times New Roman"
.Font.Bold = True
.Font.Size = 12
.TypeText "Project Name: "
.Font.Bold = False
.TypeText "<%=cProjName%>"
.TypeParagraph
.TypeParagraph
end with
Anyone have any ideas.
Thank you
Howard Katz