Save As MSWord Document

Posted by Sakthi.Singaravel under VB.NET on 5/26/2012 | Points: 10 | Views : 2377 | Status : [Member] | Replies : 6
How to execute "save as" function for MSWord using vb .net.......?

Regards,
Singaravel M



Responses

Posted by: Santhiram on: 5/26/2012 [Member] Starter | Points: 25

Up
0
Down
Dim newDoc As New Word.Document
newDoc = WordApp.Documents.Add
newDoc.SaveAs("My new Document")

Is this u want?

Sakthi.Singaravel, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 5/31/2012 [Member] Silver | Points: 25

Up
0
Down
but in my application has saveAs2 and its throws error..

Regards,
Singaravel M

Sakthi.Singaravel, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 5/31/2012 [Member] Silver | Points: 25

Up
0
Down
i added microsoft word object library 9.

Regards,
Singaravel M

Sakthi.Singaravel, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 5/31/2012 [Member] Silver | Points: 25

Up
0
Down
my reference is correct?

Regards,
Singaravel M

Sakthi.Singaravel, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santhiram on: 6/1/2012 [Member] Starter | Points: 25

Up
0
Down
This method can be used only in Word 2010 projects.Which version is your Word Document.For complete refernce u can see this link

http://msdn.microsoft.com/en-us/library/microsoft.office.tools.word.documentbase.saveas2.aspx

Sakthi.Singaravel, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 6/2/2012 [Member] Silver | Points: 25

Up
0
Down
i m using all versions word 2003 2007 2010..

Regards,
Singaravel M

Sakthi.Singaravel, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response