How can I pass a global variable string from ACCESS 97 to WORD 97. Or, read an ACCESS table from MS WORD and retrieve a field value. Either will work.
Table: tblDBParameters
Field: PathToEForms
Variable: vPathToEForms
I open word with the following statement from behind a command button in ACCESS:
I need to have MS WORD utilize the vPathToEForms variable or the value of the field in the table tblDBParameters. So, I am asking how do I pass this Global variable vPathToEForms to WORD or have word through some VBA coding read the ACCESS table and retrieve the info.
Thanks.
Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]
Table: tblDBParameters
Field: PathToEForms
Variable: vPathToEForms
I open word with the following statement from behind a command button in ACCESS:
Code:
Dim vFormName as String
vFormName = vPathToEForms & "DDEStartUp.dot"
Dim MyAppID, ReturnValue
MyAppID = Shell("c:\program files\microsoft office\office\winword.exe /t" & vFormName, vbMaximizedFocus) ' Open MSWord w/DDEStartUp Form
AppActivate MyAppID ' Activate Microsoft Word.
I need to have MS WORD utilize the vPathToEForms variable or the value of the field in the table tblDBParameters. So, I am asking how do I pass this Global variable vPathToEForms to WORD or have word through some VBA coding read the ACCESS table and retrieve the info.
Thanks.
Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]