Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Or could someone send me a simple sample of a working new tab on the
ribbon calling a macro. This really greate person can send me such a file to ipp_flaurent --at-- yahoo.ca Thank you in advance! Yours, FL |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Anybody for a hand of help?
|
#4
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Try asking in microsoft.public.word.programming.
-- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Frédéric Laurent" wrote in message ups.com... Anybody for a hand of help? |
#5
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Hi Frederic,
Let me try to help you. Sorry that I didn't see your message earlier. I just tried what you did and it works here. I would make the following two modifications to your RibbonX code: a) delete the blank line between customUI and ribbon b) get rid of the startFromScratch attribute of ribbon, and just make that be ribbon I copied the code from your rel-file and added it to one I had here. I created the sub-directory and put the customUI.xml file there, and then zipped everything up. The button displays perfectly. You should check that your docm file is in a trusted location. That means in a trusted location specifically designated in Word Options, Trust Center, Trust Center Settings, Trusted Locations. I put my docm file on the desktop and it worked fine from there. I hope this helps. If not, ask again here. Also, subscribe to my blog on my website. I am blogging on RibbonX and ribbon customization. Patrick Schmid -------------- http://pschmid.net "Frédéric Laurent" wrote in message oups.com: 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 |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I "reveal codes" in Word the way I could in Word Perfect? | Microsoft Word Help | |||
WP merge file to Word | Tables | |||
How can Word display full path of a file in the title bar? | Microsoft Word Help | |||
Does Word have a QuickCorrect/Quick Word option like WordPerfect? | New Users | |||
Envelope Address | New Users |