OK, that's doable. The UpdateTableFromCSV() macro below automates the
"convert to table" method that I mentioned before.
Put these three macros in a module in your template (see
http://www.gmayor.com/installing_macro.htm if you need instructions). Change
the path and name of the csv file (in the line that defines the variable
csvFileName) to the one you use.
Public Sub AutoNew()
UpdateTableFromCSV
Dialogs(wdDialogFileSaveAs).Show
End Sub
Public Sub AutoOpen()
UpdateTableFromCSV
ActiveDocument.Save
End Sub
Private Sub UpdateTableFromCSV()
Dim oRg As Range
Dim oDoccsv As Document
Dim csvFileName As String
csvFileName = _
"C:\Documents and Settings\Clint\My Documents\Data.csv"
Set oRg = ActiveDocument.Bookmarks("csv_here").Range
On Error Resume Next
Set oDoccsv = Documents.Open( _
FileName:=csvFileName, _
ConfirmConversions:=False, _
Format:=wdOpenFormatText)
If Not oDoccsv Is Nothing Then
With oRg
Do While .Tables.Count
.Tables(1).Delete
Loop
.Text = oDoccsv.Content.Text
oDoccsv.Close savechanges:=wdDoNotSaveChanges
Set oDoccsv = Nothing
.Style = ActiveDocument.Styles("Normal")
.ConvertToTable Separator:=","
End With
ActiveDocument.Bookmarks.Add Name:="csv_here", _
Range:=oRg.Tables(1).Range
Else
MsgBox "Could not find " & csvFileName
End If
End Sub
Add a bookmark named "csv_here" in the body of the template and save it.
Then use File > New to create a document based on the template. Each time
you create a new document or open an existing document based on this
template, the table will be updated to the current contents of the csv file.