Table found; delete it and then copy current version.
tdfsCalling.Delete (strTable)
DoCmd.CopyObject destinationdatabase:=strCallingDb, _
newname:=strTable, _
sourceobjectType:=acTable, _
sourceobjectname:=strTable
Debug.Print “ Old “; strTable _
& “deleted; about to copy current version”
End If
Set rst = dbsCalling.OpenRecordset(strTable)
rst.MoveFirst
Do While Not rst.EOF
strRibbonName = rst![RibbonName]
strRibbonXML = rst![RibbonXML]
Load the Ribbon from the table record (if it has not already been loaded).
Application.LoadCustomUI _
customuiname:=strRibbonName, _
customuixml:=strRibbonXML
rst.MoveNext
Loop
dbsCalling.Close
Set dbsCalling = Nothing
ErrorHandlerExit:
Exit Function
ErrorHandler:
MsgBox “Error No: “ & Err.Number _
& “; Description: “ & Err.Description
Resume ErrorHandlerExit
End Function
Once the add-in has been loaded, you can select Enable Extras Tab from the Add-ins menu on the
Database Tools tab of the Ribbon, as shown in Figure 15.16.
Part III Adding More Functionality to Office