Customized ribbon now need to link

D

DESPERATE IN MS

I have tried for several days to try and figure this out, but no luck.

I Customized the ribbon in Word 2007 adding a custom tab using Visual Studio
2008.
I have added a dropdown box to the custom tab using Visual Studio. This has
been saved as the Normal template. Word opens with the new tab showing the
dropdown but here is where I get lost.

I have several (10-27) other Word doc's that I need to add to the dropdown
that will allow a user to select the doc by name and this will automatically
open the document (probably in a new window)

I have searched this for day now and apparently I am not using the correct
verbage because I get all kinds of instructions to do what I have already
done but nothing on how or what to do with the dropdown...or button...or
label...I am willing to use whatever I need to get this working. I hope
someone can give me guidenance with this.
 
G

Graham Mayor

You can use either a menu or a dropdown dialog box to present your choices.
See the final example at http://gregmaxey.mvps.org/Customize_Ribbon.htm
This adds several macros to a dropdown. You can use the macros to open
particular documents.

The following is a section from a project I was toying with which shows the
code for a single menu. A tab could have several such menus with the
documents divided according to type. The project in question had 11 such
menus.

Each button has an ID number and in this instance it was used with a macro
BtnOnAction which could be used with a raft of case statements to open the
document associated with the button ID

Public sID As String
Public sPath As String
Sub BtnOnAction(control As IRibbonControl)
sID = control.ID
sPath = "d:\My Documents\Word Documents\"
Select Case control.ID
Case "Btn5101": Documents.Open sPath & "doc12.docx"
Case "Btn5102": Documents.Open sPath & "doc13.docx"
Case "Btn5103": Documents.Open sPath & "doc14.docx"
Case "Btn5104": Documents.Open sPath & "doc15.docx"
Case "Btn5105": Documents.Open sPath & "doc16.docx"
Case "Btn5201": Documents.Open sPath & "doc17.docx"
Case "Btn5202": Documents.Open sPath & "doc18.docx"
Case "Btn5301": Documents.Open sPath & "doc19.docx"
Case "Btn5302": Documents.Open sPath & "doc20.docx"
Case "Btn5303": Documents.Open sPath & "doc21.docx"
Case "Btn5304": Documents.Open sPath & "doc22.docx"
Case "Btn5305": Documents.Open sPath & "doc23.docx"
Case "Btn5306": Documents.Open sPath & "doc24.docx"
Case "Btn5307": Documents.Open sPath & "doc25.docx"
Case "Btn5308": Documents.Open sPath & "doc26.docx"
Case "Btn5309": Documents.Open sPath & "doc27.docx"
Case "Btn5310": Documents.Open sPath & "doc28.docx"
Case Else
End Select
End Sub


<group id="Grp005" label="Templates">
<menu id="GP005Menu001" label="Templates" size="large" image="Template" >
<menuSeparator id="GP5001Sep1" title="Performance Review Templates." />
<button id="Btn5101" onAction="BtnOnAction" showImage="true"
image="Template" label="Three Month Review - Memo"/>
<button id="Btn5102" onAction="BtnOnAction" showImage="true"
image="Template" label="Six Month Review - Memo"/>
<button id="Btn5103" onAction="BtnOnAction" showImage="true"
image="Template" label="Annual Performance Review"/>
<button id="Btn5104" onAction="BtnOnAction" showImage="true"
image="Template" label="Objectives Template"/>
<button id="Btn5105" onAction="BtnOnAction" showImage="true"
image="Template" label="Performance Review Feedback"/>
<menuSeparator id="GP5001Sep2" title="Performance Review Guidance." />
<button id="Btn5201" onAction="BtnOnAction" showImage="true"
image="Template" label="Performance Review Guidance Notes"/>
<button id="Btn5202" onAction="BtnOnAction" showImage="true"
image="Template" label="Performance Review Enablers"/>
<menuSeparator id="GP5001Sep3" title="Human Resources Main." />
<button id="Btn5301" onAction="BtnOnAction" showImage="true"
image="Template" label="Sickness Notification"/>
<button id="Btn5302" onAction="BtnOnAction" showImage="true"
image="Template" label="Change Of Address form"/>
<button id="Btn5303" onAction="BtnOnAction" showImage="true"
image="Template" label="Parental Leave Authorisation"/>
<button id="Btn5304" onAction="BtnOnAction" showImage="true"
image="Template" label="Proposal to Evaluate"/>
<button id="Btn5305" onAction="BtnOnAction" showImage="true"
image="Template" label="Volunteering Form"/>
<button id="Btn5306" onAction="BtnOnAction" showImage="true"
image="Template" label="Team Sickness Template"/>
<button id="Btn5307" onAction="BtnOnAction" showImage="true"
image="Template" label="JEMS form"/>
<button id="Btn5308" onAction="BtnOnAction" showImage="true"
image="Template" label="Long Course Sponsorship"/>
<button id="Btn5309" onAction="BtnOnAction" showImage="true"
image="Template" label="Self Certification form"/>
<button id="Btn5310" onAction="BtnOnAction" showImage="true"
image="Template" label="Team Training Plan"/>
</menu>
</group>

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
D

DESPERATE IN MS

I don't know if my inital reply went or not.

I have followed your instrustions but I get the dropdown to show, macros to
run manually, but can't get the macros to show in the dropdown. This has been
so confusing for me since I am not familiar with the coding and word doesn't
give you any assistance in writing them.

Any suggestions to where I may look for my problem? I don't see it.
 
G

Graham Mayor

Send me a copy of the CustomUI.XLM file produced by Visual Studio to the
link on the home page of my web site so I can see what you are trying to
do - along with a list of the paths and filenames that you want to apply.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top