Icons copy

G

Guest

Ref: Windows XP service Pack 2 – Office 2003.

How can I copy tool bars’ icons and paste them in a Word text document as an
image?

I used to do this, without difficulty when using Office 2002.

Thanks a lot. Naticruz
 
J

Jay Freedman

Display the Tools > Customize dialog. Right-click the icon on the
toolbar and select Copy Button Image. Close the dialog and paste the
image into the document.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
O

Opinicus

Display the Tools > Customize dialog. Right-click the icon on the
toolbar and select Copy Button Image. Close the dialog and paste the
image into the document.

I didn't know you could do that. On occasion I've needed to copy a whole
toolbar (for future reference before updating/upgrading Office) and for that
purpose I've used Snagit. Is it possible to capture a whole toolbar from
within Office?
 
J

Jay Freedman

I didn't know you could do that. On occasion I've needed to copy a whole
toolbar (for future reference before updating/upgrading Office) and for that
purpose I've used Snagit. Is it possible to capture a whole toolbar from
within Office?

I don't think so -- as far as I know, it's only one button at a time.
Stick with SnagIt for anything more.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
G

Guest

It is possible to create a macro that copies all the icons from the commands
in a toolbar. The macro below copies the icons from the Standard toolbar one
by one and inserts the icons at the end of the active document together with
the related captions.

Sub CopyToolbarIcons()

Dim ocontrol As CommandBarControl

With ActiveDocument
For Each ocontrol In CommandBars("Standard").Controls
On Error Resume Next
'Copy the icon
ocontrol.CopyFace
With Selection
.EndKey (wdStory)
'Paste icon
.Paste
'Insert caption of control and paragrah
.InsertAfter vbTab & ocontrol.Caption & vbCr
End With
Next ocontrol
End With

End Sub


Note that the macro only copies icons from "first level" commands in the
toolbar. If a toolbar contains menus that contain commands with icons to be
copied, the macro must be extended to iterate through all commands in each of
the menus too - and in case of submenus, you will have to include them too.
In VBA, all of the commands are controls, i.e. a command in a submenu is a
CommandBarControl in a CommandBarControl in a CommandBarControl (toolbar >
menu command > submenu command).

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top