Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference a userform in a word document from access

Status
Not open for further replies.

afarnes

IS-IT--Management
Mar 29, 2001
11
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top