VBE313
Well-known Member
- Joined
- Mar 22, 2019
- Messages
- 686
- Office Version
- 365
- Platform
- Windows
I have a custom ribbon in this Excel file, and below is a group in my manifest.xml file. I have the the getContent going to a macro called "RDBdynamicMenuContent2." Is there a way to embed MYPath file path into this workbook? Instead of reading the Contacts.txt file from this J drive, can I embed this file like a Manifest.xml file?
VBA Code:
Public Sub RDBdynamicMenuContent2(control As IRibbonControl, ByRef returnedVal)
Dim MYPath As String
Dim xml As String
[B] MYPath = "J:\Industries\1126\Bad files\BOM\RMFGContacts.txt"[/B]
xml = LoadTextFile(MYPath)
returnedVal = xml
On Error Resume Next
rib.InvalidateControl ("RDBDynamicMenu")
End Sub
XML:
<group id="PeopleButtons" label="To/From" >
<dynamicMenu id="RDBDynamicMenu" getContent="RDBdynamicMenuContent2" imageMso="AddUserToPermissionGroup" label="Choose Author and Customer" size="large" supertip="Auto-populate the Author and Internal Customer" />
</group>