I need a command button that will either create a new Word document based on a template (recommendation.dot) and save it as the primary key (ie. "7831.doc"
or open the file if it was already created. Can anyone get me started or give me some hints.
Here's what I have so far:
Dim docObject As Object
Set docObject = CreateObject("word.application"
docObject.Visible = True
Set Document = docObject.Documents.Add _
("C:/Database/Recommendation.dot"
txtCase.SetFocus
docObject.SaveAs (txtCase.Text + ".doc"
Thanks a lot.
Here's what I have so far:
Dim docObject As Object
Set docObject = CreateObject("word.application"
docObject.Visible = True
Set Document = docObject.Documents.Add _
("C:/Database/Recommendation.dot"
txtCase.SetFocus
docObject.SaveAs (txtCase.Text + ".doc"
Thanks a lot.