Here's my code:
'=====================================
Private Sub add_doc_Click()
Documents.Open (net_director + "Add Document.doc"
ActiveDocument.Variables.Add Name:="net_dir", Value:=net_director
MsgBox (ActiveDocument.Name)
End Sub
'==========================================
Note: net_director is a public function and it is the value of the network directory where these files are stored.
What I want to do is pass the value of net_director to add document.doc. Am I way off in my code?
Add document.doc has macros, I haven't declared net_dir at all in add document.doc, however, there is a button and when I click the button this is my code
'===========================
MsgBox (net_dir)
'===========================
Note: Msgbox (net_dir) is always blank.
Thanks for you help.
'=====================================
Private Sub add_doc_Click()
Documents.Open (net_director + "Add Document.doc"
ActiveDocument.Variables.Add Name:="net_dir", Value:=net_director
MsgBox (ActiveDocument.Name)
End Sub
'==========================================
Note: net_director is a public function and it is the value of the network directory where these files are stored.
What I want to do is pass the value of net_director to add document.doc. Am I way off in my code?
Add document.doc has macros, I haven't declared net_dir at all in add document.doc, however, there is a button and when I click the button this is my code
'===========================
MsgBox (net_dir)
'===========================
Note: Msgbox (net_dir) is always blank.
Thanks for you help.