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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use VBA to paste picture into cell of Word table

Status
Not open for further replies.

peterkin9

Programmer
Oct 10, 2002
6
GB
I am trying to print an ID-label using a table in a Word document. One of the cells is to contain a picture of the part which is being processed. In order to confine the picture to the size of the cell, I have inserted a text box into the cell. If I paste the picture manually, it works, but when I select the cell as range object and paste the picture, the picture goes to its full size. I think I am pasting outside the text box, but text boxes do not appear in the Object Browser. If I try converting the text box to a frame - which would appear in the Object Browser - the rest of the table flows round it so that won't work. Has anyone any ideas please as it seems so trivial that it must be possible.

Many thanks

Peter Kinsman
 
I have found a way round the problem!
I recorded a macro of Insert/Picture/From File and then copied part of the VBA code into my program. Seems to work, but many thanks anyway.

Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top