Reply
 
Thread Tools Display Modes
  #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

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

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   Report Post  
Posted to microsoft.public.word.docmanagement
Frédéric Laurent
 
Posts: n/a
Default New ribbon in Word 2007

Anybody for a hand of help?

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP
 
Posts: n/a
Default New ribbon in Word 2007

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   Report Post  
Posted to microsoft.public.word.docmanagement
Patrick Schmid
 
Posts: n/a
Default New ribbon in Word 2007

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I "reveal codes" in Word the way I could in Word Perfect? crystal Microsoft Word Help 3 May 11th 06 02:10 AM
WP merge file to Word sstires Tables 4 February 14th 06 06:26 PM
How can Word display full path of a file in the title bar? SAsif Microsoft Word Help 1 January 26th 06 04:32 PM
Does Word have a QuickCorrect/Quick Word option like WordPerfect? CW New Users 2 December 20th 05 05:54 PM
Envelope Address GR New Users 5 April 24th 05 09:48 PM


All times are GMT +1. The time now is 01:57 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"