Need to open text file for use in Excel Backstage/Ribbon component
Posted on 2013-01-15
I am looking to assign dynamic text to the label property a labelControl object in a custom Backstage/Ribbon project(in Excel), this text needs to come from an external text file.
I am looking for a method similar to the one which currently works when I want to reference an image file per below:
Sub getImage(control As IRibbonControl, index As Integer, ByRef image)
Set image = LoadPicture("c:\temp\image1.jpg")
The labelControl object has a callback property (getLabel), which I intend to use in order to feed the text from the external text file to it.
So something like:
Sub getExternalText(control As IRibbonControl, ByRef textfile)
Set textfile= LoadFile("c:\temp\test.text")
..would be great if it worked.
Appreciate any suggestions
Thanks a lot