Solved

Picture insertion with Word VBA and Window integration

Posted on 2011-02-17
3
354 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
  • 2
3 Comments
 

Author Comment

by:Lawlords
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks GrahamSkan, I will look for another way round.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Outlook Free & Paid Tools
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now