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.
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.