Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to right justify text in generated Word document using docapp

Status
Not open for further replies.

THerman

IS-IT--Management
Apr 17, 2003
21
GB
Hello,

I am generating a word document from an Access Database, which formats the document and fills in text depending on items in the database.

I need to be able to right justify some of the text in this document.

I am aware that you can set fonts in the following way:

set docApp = CreateObject("Word.Application")
set docDoc = docApp.Documents.Add
docapp.selection.Font.Name = "Times New Roman"
docapp.selection.Font.Size = 12

Is it possible to set text to be left/right/centre/justified in a similar way?

Thanks in advance for any help, as cannot find anything on this on the web, and is driving me nuts.

-Tim
 
docapp.selection.ParagraphFormat.Alignment = wdAlignParagraphRight

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top