save file with pre-defined name

H

HS1

Hello all

From a Form presenting a record, I use Automation to open a Doc file
template for printing envelops. The details of the record (name,
address... ) of the record will be presented in this envelop. I use Bookmark
for inserting the values of the record for the fields in the envelop
template. I set the template as Read-only. After printing a envelop, I want
to save this file using "Save As..". The application will ask me to type a
file name for this new file in the "File name"

I do not want to type a name as it takes time to do it.

Do you know a way so that the "File name" field in "Save as" dialog box will
display automatically the name of seleted field of the record ( so I only
need to click "Save")
Thank you
S.Hoa
 
D

Dirk Goldgar

HS1 said:
Hello all

From a Form presenting a record, I use Automation to open a Doc file
template for printing envelops. The details of the record (name,
address... ) of the record will be presented in this envelop. I use
Bookmark for inserting the values of the record for the fields in the
envelop template. I set the template as Read-only. After printing a
envelop, I want to save this file using "Save As..". The application
will ask me to type a file name for this new file in the "File name"

I do not want to type a name as it takes time to do it.

Do you know a way so that the "File name" field in "Save as" dialog
box will display automatically the name of seleted field of the
record ( so I only need to click "Save")
Thank you
S.Hoa

If you're automating Word, why don't you just call the document object's
SaveAs method and pass the name you want it saved under? Along the
lines of ...

appWord.ActiveDocument.SaveAs _
strFolder & "\" & Me.txtWhatever & ".doc"

Then you wouldn't even have to click "Save".
 
H

HS1

Thank you, so simple but I do not know

Dirk Goldgar said:
If you're automating Word, why don't you just call the document object's
SaveAs method and pass the name you want it saved under? Along the
lines of ...

appWord.ActiveDocument.SaveAs _
strFolder & "\" & Me.txtWhatever & ".doc"

Then you wouldn't even have to click "Save".

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top