L
Listrom
Being an amateur, I would greatly appreciate some urgent help, as I might
have promised my dear users to make something a bit too advanced for me…:
Word 2003 – I’m trying to make a template where I have defined “our†styles,
made a automatic update of TOC, and in a dialog box they are supposed to type
in title and date of the document, and they should also choose a picture
(among four) to bee placed in the header, behind the text on the front page.
So far so good, except the alignment of the picture. I am trying to center
it, but it doesn’t work. I am sure it is just some detail I just have not
understood. Code is enclosed without all my experiments with
alignment….Strange, because it actually worked for a while for me, but not
for my testuser, and later not for me either. The picture ends up
rightaligned, partly outside the page. I know I changed to a different
normal.dot, could this have something to say? Could it be other settings
that would override my code?
ActiveWindow.ActivePane.View.SeekView = wdSeekFirstPageHeader
ActiveDocument.Shapes.AddPicture(Anchor:=Selection.Range,
FileName:= _
"K:\Maler\Bakgrunnsbilder\Oker_fyr.bmp" _
, LinkToFile:=False, SaveWithDocument:=True, Left:=15, Top:=20,
Width:=565.2, Height:=800.35).ZOrder msoSendBehindText
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
So, 1 – how do I centeralign the picture in the code, and how do I make sure
this work for users with different settings?
have promised my dear users to make something a bit too advanced for me…:
Word 2003 – I’m trying to make a template where I have defined “our†styles,
made a automatic update of TOC, and in a dialog box they are supposed to type
in title and date of the document, and they should also choose a picture
(among four) to bee placed in the header, behind the text on the front page.
So far so good, except the alignment of the picture. I am trying to center
it, but it doesn’t work. I am sure it is just some detail I just have not
understood. Code is enclosed without all my experiments with
alignment….Strange, because it actually worked for a while for me, but not
for my testuser, and later not for me either. The picture ends up
rightaligned, partly outside the page. I know I changed to a different
normal.dot, could this have something to say? Could it be other settings
that would override my code?
ActiveWindow.ActivePane.View.SeekView = wdSeekFirstPageHeader
ActiveDocument.Shapes.AddPicture(Anchor:=Selection.Range,
FileName:= _
"K:\Maler\Bakgrunnsbilder\Oker_fyr.bmp" _
, LinkToFile:=False, SaveWithDocument:=True, Left:=15, Top:=20,
Width:=565.2, Height:=800.35).ZOrder msoSendBehindText
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
So, 1 – how do I centeralign the picture in the code, and how do I make sure
this work for users with different settings?