Basically I'm trying to control a userform and it's text boxes, control boxes etc that has already been created in Word from a Microsoft Access database. Don't know the code to reference a userform from outside of word.
I can control the actual content in the word document easy enough using the following code from an access form but cant find a way to refer to the userforms.
Dim LWordDoc As String
Dim oApp As Object
LWordDoc = "C:\Program Files\Heater Drawing rogram\HeaterDrawing.doc"
Set oApp = CreateObject(Class:="Word.Application")
oApp.Visible = True
oApp.Documents.Open filename:=LWordDoc
With oApp
.......
End With
.Selection.MoveRight Unit:=wdCell
I can control the actual content in the word document easy enough using the following code from an access form but cant find a way to refer to the userforms.
Dim LWordDoc As String
Dim oApp As Object
LWordDoc = "C:\Program Files\Heater Drawing rogram\HeaterDrawing.doc"
Set oApp = CreateObject(Class:="Word.Application")
oApp.Visible = True
oApp.Documents.Open filename:=LWordDoc
With oApp
.......
End With
.Selection.MoveRight Unit:=wdCell