Writing Data From SQL Server to MS Word using VB.NET

Hi All,

I need to write data from SQL Server to MS Word. I have never done that and even I dont have any idea how to proceed. I really apprecite if any body can help me. Please post sample code if any.
Thanks in advance,
Kumar.
0
KumarVrk
3/14/2004 6:44:43 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

1 Replies
995 Views

Similar Articles

[PageSpeed] 48

Word has a fairly robust object model. For starters you should create windows application project and add a COM reference to the Microsoft Word type library.

The following code will create a document and add some text:
Dim objWord As New Word.Application()
Dim objDoc As Word.Document
objWord.Visible = True
objDoc = objWord.Documents.Add()
objDoc.Range.InsertAfter("aaaa")
Information on Word developement canbe found at:
http://msdn.microsoft.com/library/en-us/dnanchor/html/odc_ancword.asp?frame=true
0
jkestler
3/16/2004 3:21:05 AM
Reply: