View Single Post
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Frédéric Laurent
 
Posts: n/a
Default New ribbon in Word 2007

Hello,

I created a simple .docm file (doc with macros) in Word 2007. I have a
"Hello world" marco in it.

The only thing I want is to display a new tab in the existing ribbon
with a simple button whent I click on it it displays... Hello World.

To do so, I created a macro in VBA, just like I always did it since
Word 97.

I created a file "customUI.xml" I inserted int the "zip-doc" file (in
the sub directory "customUI")

customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"

ribbon startFromScratch="False"
tabs
tab id="CustomTab" label="My new tab here" visible="1"
group id="SimpleControls" label="A group of simple
controls here" visible="1"
button id="Button1" size="large" label="A button here"
visible="1"
onAction="Module1.HelloWorld" /
/group
/tab
/tabs
/ribbon
/customUI

I changed the .rels file to have :
?xml version="1.0" encoding="UTF-8" standalone="yes"?
Relationships
xmlns="http://schemas.openxmlformats.org/package/2006/relationships"
Relationship Id="rId3"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"
Target="docProps/app.xml"/Relationship Id="rId2"
Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"
Target="docProps/core.xml"/Relationship Id="rId1"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"
Target="word/document.xml"/Relationship Id="rId4"
Type="http://schemas.microsoft.com/office/2006/relationships/ui/extensibility"
Target="customUI/customUI.xml" /
/Relationships

But when I open the document, I only have this security alert about the
macro inside.
I can't see a tab in the ribbon.

Any expert in tabs and other ribbons in word 2007 could help me to
perform what it seems a simple task?

Thank you very much!!!

FL