Hi,
I'm using the following code to fill a Word document with values from Access. So far, so good. But is it possible, to display the values from option fields in a word document.
The option values are 1,2, or 3 and so on.
Example:
very good good bad
---------------------------------------------------------
Service X
---------------------------------------------------------
Presentation X
---------------------------------------------------------
Knowhow X
---------------------------------------------------------
*** Code start
Private Sub cmdLetter_Click()
Dim wrdApp As New Word.Application
Dim wrdDoc As Word.Document
Dim wrdPositions As Word.Bookmarks
Set wrdDoc = wrdApp.Documents.Add("AccessToWord"
Set wrdPositions = wrdDoc.Bookmarks
With wrdPositions
.Item("Adress".Range.Text = Me.FirstName & " " & Me.LastName
.Item("Strreet".Range.Text = Me.Street
.Item("City".Range.Text = Me.ZipCode & " " & Me.City
.Item("Date".Range.Text = CStr(Date)
End With
wrdApp.Visible = True
wrdApp.Activate End Sub
**** Code end
Thank you for any help,
Peter
I'm using the following code to fill a Word document with values from Access. So far, so good. But is it possible, to display the values from option fields in a word document.
The option values are 1,2, or 3 and so on.
Example:
very good good bad
---------------------------------------------------------
Service X
---------------------------------------------------------
Presentation X
---------------------------------------------------------
Knowhow X
---------------------------------------------------------
*** Code start
Private Sub cmdLetter_Click()
Dim wrdApp As New Word.Application
Dim wrdDoc As Word.Document
Dim wrdPositions As Word.Bookmarks
Set wrdDoc = wrdApp.Documents.Add("AccessToWord"
Set wrdPositions = wrdDoc.Bookmarks
With wrdPositions
.Item("Adress".Range.Text = Me.FirstName & " " & Me.LastName
.Item("Strreet".Range.Text = Me.Street
.Item("City".Range.Text = Me.ZipCode & " " & Me.City
.Item("Date".Range.Text = CStr(Date)
End With
wrdApp.Visible = True
wrdApp.Activate End Sub
**** Code end
Thank you for any help,
Peter