General information
Category:
COM/DCOM and OLE Automation
Hi Terry,
Thanks to you all, now it is working. However one small problem I am unable to change the font size or font. The coding is as follows
loRange=activedocument.range()
With loRange
With .Font
.name="Times New Roman"
.size="12"
Endwith
.ParagraphFormat.Alignment=wdAlignParagraphLeft
.Insertafter("THIS IS THE MAIN HEADER")
.MoveEnd(wdParagraph,1)
.Collapse(wdCollapseEnd)
With .Font
.name="Times New Roman"
.size="10"
Endwith
.Insertparagraphafter()
.Insertafter("THIS IS THE SUB HEADER")
.Collapse(wdCollapseEnd)
Endwith
Both the main header and sub header appear in size 12
Regards and Thanks
Bhavesh
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only