Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 o

D

ddrozy

I am following the steps in the "Using a Visual Studio 2005 Tools for Office
Second Edition Project to Modify the Fluent UI. "

In the section, "To modify the Ribbon code and complete the add-in", step 5
says "In the same file, in the ThisAddIn partial class, immediately below the
line of code that creates the instance of the Ribbon1 class, add code that
sets the Ribbon1 class' Application property.

Visual Basic Copy Code
' In the RequestService method:
ribbon.Application = Application

Here is my code:
'TODO:
'This is an override of the RequestService method in the ThisAddIn class.
'To hook up your custom ribbon uncomment this code.
Partial Public Class ThisAddIn
Private ribbon As Ribbon1
ribbon.Application=Application


Protected Overrides Function RequestService(ByVal serviceGuid As Guid)
As Object
If serviceGuid = GetType(Office.IRibbonExtensibility).GUID Then
If ribbon Is Nothing Then
ribbon = New Ribbon1()
End If
Return ribbon
End If
Return MyBase.RequestService(serviceGuid)
End Function

End Class

I am getting two errors: 1.)Declaration Expected line 5 ribbon
2.)Type 'IRibbonControl' is not defined

Thanks for your help.
 
P

Patrick Schmid [MVP]

What does it say all the way on top of the file? (either this one or the
file containing the rest of the class). That would be before the class
declaration

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Outlook 2007 Performance Update: http://pschmid.net/blog/2007/04/13/105
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://ribboncustomizer.com
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed
 

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