>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
No quotes around the size:)
.Selection.Font.Size=10
>
>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
Imagination is more important than knowledge