hewstone999
Registered User.
- Local time
- Today, 06:31
- Joined
- Feb 27, 2008
- Messages
- 37
I have this code (Access VBA) at the moment that uses Bookmarks to insert information into a word doc.
Code:
Private Sub Command0_Click()
Dim Wrd As Object
Set Wrd = CreateObject("Word.Application")
Dim Mergedoc As String
Mergedoc = Application.CurrentProject.Path
Mergedoc = "C:\Documents and Settings\rhewston\Desktop\Testing2.doc"
Wrd.Documents.Add Mergedoc
Wrd.Visible = True
With Wrd.activedocument.bookmarks
.Item("Title").Range.Text = "Lorenzo Initial Validation Export Resource"
End With
End Sub
Is there a way I could use SQL queries to popular the word doc i.e. Insert * From Table1 - either as text or in a table.
Any ideas or help?
Code:
Private Sub Command0_Click()
Dim Wrd As Object
Set Wrd = CreateObject("Word.Application")
Dim Mergedoc As String
Mergedoc = Application.CurrentProject.Path
Mergedoc = "C:\Documents and Settings\rhewston\Desktop\Testing2.doc"
Wrd.Documents.Add Mergedoc
Wrd.Visible = True
With Wrd.activedocument.bookmarks
.Item("Title").Range.Text = "Lorenzo Initial Validation Export Resource"
End With
End Sub
Is there a way I could use SQL queries to popular the word doc i.e. Insert * From Table1 - either as text or in a table.
Any ideas or help?