Need to add a button to a form to save the current record in RTF

G

Guest

I need to add a button to a form that will save the current record in RTF
format to a folder whose name is based on a field value (let's call the field
[ItemNo]). The path except the specified folder remains the same.

Any thoughts on how to code this in VBA?

Thanks!
 
A

Alex Dybenko

You mean you want to save a form like RTF? then you can try to use
docmd.outputto method, just construct a file name based on your field, and
set required output format
 
A

Alex Dybenko

like this:
strFileName="c:\someFolder\" & me.ItemNo & ".rtf"

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Charles said:
Alex -

Thanks, I'll give that a try.

How do I construct a file name based on the field?

Thanks again!

- Charles

Alex Dybenko said:
You mean you want to save a form like RTF? then you can try to use
docmd.outputto method, just construct a file name based on your field,
and
set required output format

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


"Charles" <CUdell(reversetheloatoaolandremovebetweenparens)@loa.com>
wrote
in message news:[email protected]...
I need to add a button to a form that will save the current record in
RTF
format to a folder whose name is based on a field value (let's call the
field
[ItemNo]). The path except the specified folder remains the same.

Any thoughts on how to code this in VBA?

Thanks!
 

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