Results 1 to 1 of 1
2001-12-07, 11:28 #1
- Join Date
- Aug 2001
- London, UK
- Thanked 0 Times in 0 Posts
Insert data from Excel to Word (Office 2000)
Is it possible to automate this?
Insert information from a database or other data source into an existing Word document
What I have to do is insert a MS Excel spreadsheet into MS word Fax cover document. The data is exported to Excel automatically from access. I want the cursor to be set on a particular line (e.g. Line 10) and then automatically insert the table from that point onwards.
Is this possible???
The code am currently using is as follows:
<pre> strFileName = CSTR_DOCSPATH & "BCPSOURCE.xls"
DoCmd.OutputTo acOutputQuery, "Citco", acFormatXLS, strFileName, False
Set objWord = GetObject(CSTR_DOCSPATH & "Citco.doc", "Word.Document")
'set value to Date
Set rstCitco = db.OpenRecordset("tblCitco", dbOpenDynaset)
TDate = rst![ td ]
'Make word visible.
.Application.Visible = True
'Execute the mail merge.
.destination = wdSendToNewDocument
Set appWord = .Application
appWord.DisplayAlerts = wdAlertsNone
appWord.DisplayAlerts = wdAlertsAll
What I want to do after opening the Citco.doc is to go to a certain line e.g. Line 10 and the output certain column to certain column from excel into word (citco.doc).
Can this be done??