VB.net save opened word document!
Posted
by comii
on Stack Overflow
See other posts from Stack Overflow
or by comii
Published on 2010-04-15T14:37:18Z
Indexed on
2010/04/26
18:03 UTC
Read the original article
Hit count: 205
Hi! I just trying to made word add-ins that gone save opened document.I made ribbon and button on it.Below is the that i use for saving word document on certain location:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs) Handles Button1.Click
Dim ThisApplication As Word.Application
ThisApplication.ActiveDocument.SaveAs("C:\email")
ThisApplication.Quit()
ThisApplication= Nothing
End Sub
But when i click on this button i just made email.doc but that document does not contain any content of the opened document, it just made new doc file.
What i am doing wrong? The event on this button need to just same as event on standard Word save button, so how i can do this?
© Stack Overflow or respective owner