G
greeknl
Hi,
I am new here, I have learned a lot from this forum and my thanks to all
repliers with thaeir great suggestions.
But I have a question, using office 2003:
I am writing a vba module in Access to create a word document with values
from a the database. Everything ok there. I now want to add in the word
document a checkbox and a field counting pages.
I have managed to create a line using:
Dim oApp As Object
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
With oApp
.Selection.InlineShapes.AddHorizontalLineStandard
and I was also able to change the properties of the line.
As said I want to create a a checkbox and a field.
when using these commands, which I used in word vba and check again using the
macro recording tool in word I get errors what am I doing wrong?
.Selection.FormFields.Add Range:=Selection.Range, Type:=wdFieldFormCheckBox
.Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldNumPages
I do not want to use records in Access of do this via a Word template.
Thank you
I am new here, I have learned a lot from this forum and my thanks to all
repliers with thaeir great suggestions.
But I have a question, using office 2003:
I am writing a vba module in Access to create a word document with values
from a the database. Everything ok there. I now want to add in the word
document a checkbox and a field counting pages.
I have managed to create a line using:
Dim oApp As Object
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
With oApp
.Selection.InlineShapes.AddHorizontalLineStandard
and I was also able to change the properties of the line.
As said I want to create a a checkbox and a field.
when using these commands, which I used in word vba and check again using the
macro recording tool in word I get errors what am I doing wrong?
.Selection.FormFields.Add Range:=Selection.Range, Type:=wdFieldFormCheckBox
.Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldNumPages
I do not want to use records in Access of do this via a Word template.
Thank you