I've created my own ribbon toolbar tab with a few buttons. I can add text and similar actions to the document I'm working on. Now I want to add a button that will save the document I'm working on without using the Word save button because I want to set some of the parameters.
Every example I found showed how to save a document that was started by my code (Dim MyDoc As New Word.Application) but when I use such syntax from the ribbon button - ActiveDocument is saying that there is no active document.
Any ideas?
ThisAddIn.vb
contains:
Protected Overrides Function CreateRibbonExtensibilityObject() As _
Microsoft.Office.Core.IRibbonExtensibility
Return New MyRibbon()
End Function
MyRibbon.xml is very basic (taken from an MS sample)
<group id="ContentGroup" label="Content">
<button id="textButton" label="Insert Text"
screentip="Text" onAction="OnTextButton"
supertip="Inserts text at the cursor location."
/>
</group>