Word add-in (save from showdialog at ribbon button)

the platform is Word 2013 and VS 2013.

i wish to write a addin to save file, the button is simply placed in the ribbon.   i do not know how to call ActiveDocument to save the file.  Grateful for any help.  thx.

****************************

Imports Microsoft.Office.Tools.Ribbon
Imports System.Windows.Forms
Imports Microsoft.Office.Interop.Word

Public Class Ribbon1
    Private Sub Button1_Click(sender As Object, e As RibbonControlEventArgs) Handles Button1.Click
        Dim abcd As New SaveFileDialog()
        abcd.ShowDialog()
        abcd.DefaultExt = "docx"
        abcd.Title = "save aS"
        abcd.InitialDirectory = "e:\"

        If abcd.ShowDialog() = DialogResult.OK Then

          ' activedocument.save() ????????????????

        End If
    End Sub
End Class

February 17th, 2015 4:25am

Hi,

This is the forum to discuss questions and feedback for Microsoft Excel, I recommend you post the question to the MSDN forum for Word

https://social.msdn.microsoft.com/Forums/en-US/home?forum=worddev&filter=alltypes%2Calllanguages&sort=lastpostdesc

The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

George Zhao
TechNet Community Support

Free Windows Admin Tool Kit Click here and download it now
February 17th, 2015 9:07pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics