R
Robertico
I have a template with some tables and bookmarks.
With some code i add an image to one of the bookmarks (within a cell)
Now i'd like to use VBA to make the image the same size as the cell.
Until now i have this code:
Set WordRange = WordDoc.GoTo(What:=wdGoToBookmark, Name:="image")
Set iShape = WordRange.InlineShapes.AddPicture(Filename:=rs!image,
LinkToFile:=False, SaveWithDocument:=True)
With iShape
.Height = 365.25
.Width = 486.75
End With
I'd like to replace these values with the cell format.
With this code i tried to receive the cell format.
WordRange.Cells.Height
WordRange.Cells.Width
Tried to change it this way:
With iShape
.Height = WordRange.Cells.Height
.Width = WordRange.Cells.Width
End With
But it doesn't work as wanted. Please some advice.
Thanks in advance
Robertico
With some code i add an image to one of the bookmarks (within a cell)
Now i'd like to use VBA to make the image the same size as the cell.
Until now i have this code:
Set WordRange = WordDoc.GoTo(What:=wdGoToBookmark, Name:="image")
Set iShape = WordRange.InlineShapes.AddPicture(Filename:=rs!image,
LinkToFile:=False, SaveWithDocument:=True)
With iShape
.Height = 365.25
.Width = 486.75
End With
I'd like to replace these values with the cell format.
With this code i tried to receive the cell format.
WordRange.Cells.Height
WordRange.Cells.Width
Tried to change it this way:
With iShape
.Height = WordRange.Cells.Height
.Width = WordRange.Cells.Width
End With
But it doesn't work as wanted. Please some advice.
Thanks in advance
Robertico