Picture insertion with Word VBA and Window integration

Dear all,

I am thinking of designing a marco to simplify the picture insertion procedures by inserting the picture to cell(1,1) of the tables after clicking the pictures in the window explorer. Can anyone advise how to do it?


Thanks
LawlordsAsked:
Who is Participating?
 
GrahamSkanConnect With a Mentor RetiredCommented:
You should know that that is extremely difficult. Remember that Windows Explorer is not COM-enabled. so you would need to find some API that could find the instance (there can be more than one) of the Explorer application that was last in focus (the focus now being on the Word application), and finding which, if any, graphic file(s) are selected and then inserting it or them as inline shapes into the given cell.

However it is relatively simple to create a macro that will open a dialogue, allow the user to select a graphics file and to insert the picture in a specific place. This would only differ from the built-in functionality in that the insertion would take place at a specific location (eg.a table cell) as opposed to the selection point.
0
 
LawlordsAuthor Commented:
Just to clarity, each selected picture shall be inserted to cell(1,1) of the tables. (e.g. table 1, table 2 and so on..)
0
 
LawlordsAuthor Commented:
Thanks GrahamSkan, I will look for another way round.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.