Automatic Document Save

brsawvel

Registered User.
Local time
Today, 14:13
Joined
Sep 19, 2007
Messages
256
Hello,

I have a vb code written that opens a word document and displays the results of a query. What is the code to cause the document, after opened and populated, to automatically save a copy into a predesignated folder - and to rewrite previous existing documents with the same name?

Predesignated folder:
Code:
 "c:\" & me.fldA

Name of document:
Code:
 & me.fldA".doc"
 
A Word.Document object has a SaveAs method. Check it out in the object browser or Word VBA Help.
Simple sample...
Code:
dim wd as word.document
...opened
...populated
wd.SaveAs "c:\" & me.flda & ".doc"
 

Users who are viewing this thread

Back
Top Bottom