Hi Chris,
> ... and have Word look for an open instance of the Access database
> (with a specified name) and if open grab the application path
> set in a specific table and use that information to set
> the strString parameter's value.
hm...
If Access is running, then Access should no,
what database is open or if there is a database at all.
Public Sub PassToWord()
' reference to word library set
' tools references
' word already running
Dim oWrd As Word.Application
Set oWrd = GetObject(, "Word.application")
oWrd.Run "GetFromAccess"
End Sub
Sub GetFromAccess(Optional s As String)
Dim sPth As String
sPth = "c:\configs"
If s <> "" Then sPth = s
MsgBox sPth
End Sub

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Chris - 26 Oct 2005 23:19 GMT
Duh, I finally got what you were saying. It's been a long day. Thanks for
the help.
Here is what I did. In Access I wrote:
'This process creates an incident of the Word Application
Dim ObjWord As Word.Application
Set ObjWord = New Word.Application
ObjWord.Visible = True
AppActivate "Microsoft Word"
Set ObjWord = GetObject(, "Word.application")
ObjWord.Run "GetFromAccess", rst![Database Location]
rst.Close
Set rst = Nothing
'This command runs the referenced Macro in the Word Aplication
ObjWord.Run MacroName:="Normal.NewMacros.Stepa_CreateServerTextFiles"
In Word here is what I wrote (Note: The strString field is a global
parameter):
Sub GetFromAccess(appLocation As String)
'This process is used to obtain the "Database" path form the access
'database. This removes the need for user intervention within the
'Word application. This replaced the "strString = 'I:\Configs"' line
'within the "Stepa_CreateServerTextFiles" Macro.
strString = appLocation
End Sub