Re: Graphics insertion
From: Åsa Holmgren (asa)
Date: 12/14/04
- Next message: Jean-Guy Marcil: "Re: FileSearch"
- Previous message: Jean-Guy Marcil: "Re: Using insertfile for documents with customized outline numberi"
- In reply to: mjcnospam-google_at_yahoo.com: "Re: Graphics insertion"
- Next in thread: mjcnospam-google_at_yahoo.com: "Re: Graphics insertion"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 14 Dec 2004 16:52:01 +0100
Michael,
nice to hear that the solution works!
You could set the achor of the new shape to the range of the
"TitlePageGraphic" shape, like this:
<--snipp-->
Set r = g_doc.Shapes("TitlePageGraphic").Anchor
Set shp = g_doc.Shapes.AddPicture( _
FileName:="C:\Bilder&ljud\Jpeg\Love.jpg", _
LinkToFile:=False, Anchor:=r)
<--snipp-->
If the graphic is to be on the documents first page you don't have to
specify an anchor when you are using wdRelativeXxxPage.
It is the following code that tells the size and position of the inserted
graphic,
not the size and position of the "TitlePageGraphic" shape:
<--snipp-->
With shp
.Height = InchesToPoints(10.5)
.Width = InchesToPoints(8#)
.RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
.RelativeVerticalPosition = wdRelativeVerticalPositionPage
.Top = InchesToPoints(0.25)
.Left = InchesToPoints(0.25)
End With
<--snipp-->
/Åsa
<mjcnospam-google@yahoo.com> skrev i meddelandet
news:1103032402.698333.41340@c13g2000cwb.googlegroups.com...
> Asa,
>
> Thanks for the response. Right now, the picture is referenced not by a
> bookmark, but by an object. In your sample snippet, the object
> reference is missing. I would have to insert a bookmark where I want
> the graphic... Right now, the guy who edits the templates knows exactly
> where the graphic will go based on the geometry of the picture box
> (empty though it is). While this is an alternative we may have to
> pursue, I managed to get it to work by adding
>
> .ZOrder msoSendToBack
>
> before the last .ZOrder command.
>
> WHY this would make any difference at all is beyond me... but hey, it
> consistently works, so it'll do. Until it screws up again. :)
> Best,
> Michael
>
- Next message: Jean-Guy Marcil: "Re: FileSearch"
- Previous message: Jean-Guy Marcil: "Re: Using insertfile for documents with customized outline numberi"
- In reply to: mjcnospam-google_at_yahoo.com: "Re: Graphics insertion"
- Next in thread: mjcnospam-google_at_yahoo.com: "Re: Graphics insertion"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|