Lucian,
Here is an example in VB.NET:
Dim oldCI As System.Globalization.CultureInfo = _
System.Threading.Thread.CurrentThread.CurrentCulture
System.Threading.Thread.CurrentThread.CurrentCulture = _
New System.Globalization.CultureInfo("en-US")
Dim wapp As Word.Application
Dim wdoc As Word.Document
Dim dbe As DAO.DBEngine
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim strDbFullPath As String
Dim strText As String
wapp = New Word.Application()
wapp.Visible = True
wdoc = wapp.Documents.Add
strDbFullPath = "c:\temp\testDb.mdb"
dbe = New DAO.DBEngine()
dbs = dbe.OpenDatabase(strDbFullPath)
rst = dbs.OpenRecordset("tblTest", DAO.RecordsetTypeEnum.dbOpenSnapshot)
While Not rst.EOF
strText = "My name is " & rst.Fields("Name").Value & _
" and I am " & rst.Fields("Function").Value & " in this company."
With (wapp.Selection)
.TypeText(strText)
.TypeParagraph()
rst.MoveNext()
If Not rst.EOF Then .InsertBreak(Type:=Word.WdBreakType.wdPageBreak)
End With
End While
dbs.Close()
wdoc.SaveAs("c:\temp\doc1.doc")
Dim idoc As Word._Document
idoc = wdoc
idoc.Close()
Dim iapp As Word._Application
iapp = wapp
iapp.Quit()
wapp = Nothing
GC.Collect()
System.Threading.Thread.CurrentThread.CurrentCulture = oldCI
Do you want it translated to C#?
HTH,
Shamil