09-26-2009, 01:10 AM
Hi ,
I would suggest you to use "Automation Object Model (AOM)" for Word.
We can accomplish many custom requirements using AOM (as your current req.)
Try with below code , you will get it easily
Example:
I would suggest you to use "Automation Object Model (AOM)" for Word.
We can accomplish many custom requirements using AOM (as your current req.)
Try with below code , you will get it easily
Example:
Code:
Dim wrd
Const wrdalignpgraphcenter=1
Set wrd=CreateObject("Word.Application")
wrd.Visible=True
Set wrddoc=wrd.Documents.Open ("give ur word doc. path",true)
wrddoc.Range.Select
Set wrddocsel=wrd.selection
Set img= wrddocsel.InlineShapes.AddPicture("required Image path", false,true)
img.Width=img.Width*2.50
img.Height=img.Height*2.50
img.range.paragraphformat.Alignment=wrdalignpgraphcenter
wrddoc.Save
wrddoc.close
wrd.Quit
Set wrd=nothing
Set wrddoc=nothing
Set wrddocsel=nothing
Set img=nothing