Access.2007.VBA.Bibl..

(John Hannent) #1
imageMso=”CreateReportInDesignView”
size=”normal”
onAction=”CreateNewReport”/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>

Next, the XML file needs to be treated as a resource within the project, so you don’t have to deal with
a separate text file. To do this, select Ribbon.xml in the Solution Explorer, and select Embedded
Resource as the value for the Build Action property in its properties sheet (see Figure 16.20).

FIGURE 16.20

Selecting Embedded Resource as the Build Action property of the Ribbon.xml file.


Next, select “CreateObjects Properties” from the bottom of the Project menu (if you are working
with a different project, its name appears instead of CreateObjects). Click the Resources tab; if you
have not already created a resources file, all you will see is the link shown in Figure 16.21.

FIGURE 16.21

A link to add a resource to a project.


Click the link to create a resources file; a datasheet appears, with columns for Name, Value, and
Comment. Drag the Ribbon.xml file from the Solution Explorer to the Resources pane; now, as in
Figure 16.22, you will see an icon for the Ribbon.xml file.

Customizing the Access Ribbon with a Visual Studio 2005 Shared Add-in 16

Free download pdf