Solved

Picture insertion with Word VBA and Window integration

Posted on 2011-02-17
3
358 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:Lawlords
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:Lawlords
ID: 34917853
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
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 34920067
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
 

Author Closing Comment

by:Lawlords
ID: 34936113
Thanks GrahamSkan, I will look for another way round.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question