I have several graphics that I use frequently and would like to design a macro that can insert these graphics for me with a click of a button, as I require them.
You can use microsoft graph editor in work linking data from excel.. here you find a piece of the Word Help:
----------------------
Link to data in another program to create a chart
Microsoft Graph will update the chart when the data in the source program changes.
In the source program and document, select the data you want to link to the Microsoft Graph datasheet. For example, if you are working on a Microsoft Excel worksheet, select a range of cells.
On the program's Edit menu, click Copy.
Switch to Microsoft Graph, or double-click the Microsoft Graph chart in Word.
Switch to the datasheet.
How?
On the Edit menu, click Paste Link, and then click OK.
----------------------
As I believe you are asking about graphics (as in bitmap images rather than graphs, as in data), PHV has the best suggestion. Unless I am wrong, and you really are talking about graphs.
Record a macro to insert a graphic.
Take a good look at the code. If you have problems with this, post back here.
You can add any macro to any toolbar, as a button. Type in "add a macro button to a toolbar" in Help. It seems a bit daunting at first, but actually it is easy. If you have real problems, post back here.
You can also add macros to menus. You could add a "Insert Graphic" menu to a toolbar, and under that menu have a dropdown list of all the graphics you want to insert. Each menu items would fire a macro that would insert the graphic.
What you are asking for is not difficult. Try recording one macro, dragging it up as a button to a toolbar, or putting it as a menu item - just to see how it works.
Again, if you have a specific difficulty, post back.
I have a follow-up question to this thread. What about once you have created the macro toolbar button and when the graphic inserts, it is not in a mode where it can be dragged into place? I tried to record while I chose to format the picture and went to the layout tab to choose in front of text, but in record mode that option is grayed out on the layout tab. How would I do this in code? I am a beginner, so thanks in advance for any insight.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.