Thread: Custom icons
View Single Post
  #3   Report Post  
Posted to microsoft.public.word.newusers
geotso[_2_] geotso[_2_] is offline
external usenet poster
 
Posts: 47
Default Custom icons

"Stefan Blom" wrote:

Creating custom icons can be done in Word 2007, but it's more difficult than
in previous versions. Take a look at the article at
http://gregmaxey.mvps.org/Ribbon_Custom_Icons.htm.

--
Stefan Blom
Microsoft Word MVP


Stefan,

Thank you very much for your answer.
I followed the link and the instructions and finally I created a custom tab,
with a custom group and a custom image within it. However there is a minor
problem yet:
I can't make it run an assigned macro. When I click the button I get an
error message "The macro cannot be found or has been disabled...", although
the macro is saved in Normal.dotm and all security restrictions are disabled.

Here is the script produced by Custom UI Editor (partially edited by me):
customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
ribbon startFromScratch="false"
tabs
tab id="geotso" label="geotso"
group id="geotsoGroup" label="geotso"
button id="removeHyperlinks" label="Remove all hyperlinks"
image="testico" onAction="RemoveHyperlinks()" /
/group
/tab
/tabs
/ribbon
/customUI

and here is the macro:
Sub RemoveHyperlinks()
Dim oField As Field
For Each oField In ActiveDocument.Fields
If oField.Type = wdFieldHyperlink Then
oField.Unlink
End If
Next
Set oField = Nothing
End Sub

Could you help me a little more, please?

Thanks again