Insert LOGO to HEADER in Ms-WORD

R

Rajkumar

Hi All,

I am working on Word Automation VBA Application.,

I am working to generate the invoice from VB6 to Ms-Word 2003.

MY Question is :
I have one issue that How can I insert Company Logo to Header Part in Active
word Document using VB6.

I am generating invoice using DocVariable in word , it's working fine but
the movement if i inserted a LOGO to the document it's not coming.

Please help me out.
 
C

Cindy M.

Hi Rajkumar,
I am working on Word Automation VBA Application.,

I am working to generate the invoice from VB6 to Ms-Word 2003.

MY Question is :
I have one issue that How can I insert Company Logo to Header Part in Active
word Document using VB6.

I am generating invoice using DocVariable in word , it's working fine but
the movement if i inserted a LOGO to the document it's not coming.
You first need to decide whether it's more appropriate to use the Shapes or
InlineShapes collection. Does this logo need to have text wrap formatting, or
can it stand in-line with the text?

Both of these collections have an AddPicture method. And each of the two
methods has an argument that tells Word with which range the picture should be
positioned. In the InlineShapes.AddPicture method, this argument is named
"Range"; in that for Shapes.AddPicture it's called "Anchor".

To get the range for either of the two arguments:

Dim rng as Word.Range

Set rng = Doc.Sections(1).Headers(wdHeaderFooterPrimary).Range

In order to use the AddPicture method with a header:

Dim pic as Word.Shape
Set pic =
Doc.Sections(1).Headers(wdHEaderFooterPrimary).Shapes.AddPicture() 'add the
args

Respectively

Dim pic as Word.InlineShape
Set pic = rng.InlineShapes.AddPicture() 'add the args

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top