|
Example Macro (startup)
Dim objWord
' create object
Set objWord = CreateObject("Word.Application")
' open word template
With objWord
.Visible = True
.Documents.Add CurrentProject.Path & "Test.dot"
End With
' grab a field from a form in access
strTest = Me.Text1 ' or whatever
' insert into word bookmark
With objWord.ActiveDocument.Bookmarks
.Item(test1).Range.Text = strTest
End With
' destroy object
Set objWord = Nothing
Rob.
Last edited by us-media; 24-11-2005 at 06:24 PM.
|