Hi all,
I have an excel sheet with a button that is inserting the contents of a cell into a word document at a specified bookmark. Each cell in the excel sheet contains the file path of an image i.e. s:\image.png or s:\image2.png. I currently have ten word bookmarks each referencing a separate cell ("logo1"=D5, "logo2"=D6 etc); and the contents of each cell change based on a drop down in the worksheet (each of the 10 cells could reference one of 80 image file paths, depending on drop down selection).
Essentially the vba script that I am running results in the filepath being displayed as text at the word bookmark; whereas I would like the image belonging to the file path to be displayed.
I'm thinking the cleanest way would be to stick with what I have in terms of the excel vba and then have a button in word that converts the file path into an inserted image. Essentially I am after a vba that finds the text inserted at the bookmark that starts with 's:\' and ends with '.PNG' (given what is between those items will vary), cuts this text out and then replaces it with an image that matches the file path in the bookmark text.
Any help greatly appreciated!!!
Thanks!
Bookmarks