Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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 "Jay Freedman" wrote: On Sat, 18 Aug 2007 21:26:23 +0300, "Opinicus" wrote: "Jay Freedman" wrote 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? 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 FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to copy Microsoft app icons as images into a Word document | Microsoft Word Help | |||
Icons | Microsoft Word Help | |||
copy pictures of icons on the formatting toolbar in document | Microsoft Word Help | |||
How do I copy and paste icons from internet toolbar into word doc. | Microsoft Word Help | |||
Icons | New Users |