Sizing picture with macro
Hello Peter
Thanks for the answer... it works well, but I have still
two questions :
- the function AddPicture adds a picture and I am looking
for a function that refreshes the link to the picture file
instead of adding a new picture each time I open the
document. A function that deletes the old picture before
the function AddPicture could be a solution too.
- the picture I'd like to insert is in a web directory
(http://[server name]/[web directory]/[file].wmf) and I
don't know how to fix it...
Tahnks for your help
Best regards
JBC
Quote:
>-----Original Message-----
>Hello JBC
>Use this to include a picture from your hard drive:
> Selection.InlineShapes.AddPicture FileName:= _
> "[File Path]\[File Name].gif",
LinkToFile:=False, _
Quote:
> SaveWithDocument:=True
>This sizes it, although you might have to reselect the
image first:
> Selection.InlineShapes(1).Height =
73.4 'Set picture size
Quote:
> Selection.InlineShapes(1).Width = 89.55
>I can't quite remember if the values are centimetre
values or not. I don't
Quote:
>think they are. Play with this and see how altering the
height and width
>values changes your image's shape.
>Hope it helps.
>Best wishes
>Peter
>Kessler Associates
>W: http://homepages.tesco.net/~plk33/plk33/index.htm
>> Hello,
>> I am a newbie in VB and need help for a macro. I'd like
to
>> include a picture automatically on event OpenDocument
in a
>> word file. This picture must be inserted in the body of
>> the current page with a max width of 17cm (the ratio of
>> resizing must be the same for height and width of the
>> picture).
>> Thanks for your help
>> Regards
>> JBC
>.