I am working on a script that creates a Word document, but I cannot get the text to be center aligned. Here is an example of the code I'm using. (VBScript)
set objword = createobject("word.application")
set doc = objword.documents.add
set selection = objword.selection
selection.Font.name = "arial"
selection.Font.size = "20"
selection.Font.Bold = true
selection.Paragraphs.Alignment = wdAlignParagraphCenter
selection.typetext "This is the title that should be centered"
selection.typeparagraph
doc.saveas("testdoc.doc")
objword.Quit
set objword = nothing
I have tried a few different things that I found through Google, but I have not found anything that works.