Picture inserted into header is not visible

C

Craig Miles

Hi,

I have a .NET application which includes a word template and logo files as
embedded resources.
When the application runs it extracts the template and logos to a folder
(e.g. C:\Temp).
It launches word and loads the template. It then calls a macro in the
template which contains
the following code to insert the logo at the "HeaderPicture" bookmark (which
is in the Header).
The code runs and doesn't throw any errors, however the logo isn't visible.
There is something
in the header with the dimensions of the image. I can right click on this
and it gives the Edit Picture option etc
on the context menu.

Can anyone tell me why the logo isn't showing?

' Select the picture object.
robjDoc.Bookmarks("HeaderPicture").Select

' Add the required picture.
Set objShape = Selection.InlineShapes.AddPicture( _

FileName:="C:\Temp\Logo.wmf", _
LinkToFile:=False, _
SaveWithDocument:=True)
' Set the height and width of the picture.
objShape.Height = InchesToPoints(0.4)
objShape.Width = MillimetersToPoints(87)

Thanks,
Craig Miles.
 
J

Jay Freedman

Hi Craig

Try throwing this line into your code:

ActiveWindow.View.ShowPicturePlaceHolders = False
 

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