Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sizing Images In Word 97 Using VB

Status
Not open for further replies.

mdav2

Programmer
Aug 22, 2000
363
GB
The main problem is I can't work out the code select the image object. The code below is what I would use to resize it. Anyone help?


' Insert the logo
Selection.GoTo What:=wdGoToBookmark, Name:="Logo1"
Selection.InlineShapes.AddPicture FileName:=cboPromLogo.Text, LinkToFile:=False, SaveWithDocument:=True
' Format the picture to the correct height and width
Selection.InlineShapes(1).LockAspectRatio = msoFalse
Selection.InlineShapes(1).Height = 28.35
Selection.InlineShapes(1).Width = 85.05
 
I don't do VBA much, but

You could do a find and find the next graphic (^g is the code for the find box). The Find actually selects the graphic, as opposed to the Go To Graphic, which only puts the cursor before the graphic.
techsupportgirl@home.com
Brainbench MVP for Microsoft Word
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top