-
MW
This is not going to work:
Sub oTrusts()
Dim oDoc As ActiveDocument
Select Case Control.ID
You have not passed the control parameter, and oTrusts is not the OnAction procedure in your XML, and you have not set the oDoc object variable.
Sub MyBtnMacro(Control As IRibbonControl)
Dim oDoc as Document
Set oDoc = ActiveDocument
Select Case ...
Also, and I am guilty of not always practicing what I might preach, RibbonControl is not really a good module name as it could easily be contained in multiple projects. Something unique to the project is better e.g., TrustProjRibCon
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules