saving form as a word document for e-mail purpose

  • Thread starter Thread starter Sole Faith
  • Start date Start date
S

Sole Faith

Guest
(I hope this is the right place for this question :) )
I've tried to search for a solution to my problem, however most (like all?) of the people posting seem to know what they are talking about while I had trouble following them.

This is the situation:
I am given a task to implement some way of saving a form as a word document for e-mail purposes.
What I have in my hands is a database(i think?) which has a button to convert it into a form and on the form is another button to print the form.
The problem is, while being able to keep a hard copy of the forms are handy, an option of being able to save it in the format of word document so that it can be e-mailed rather than by post, was desirable by the users (Not that I have a choice in this matter).

As my comment up the top implies, I'm fairly new to such complicated aspects of Access(ie. anything more than simple form creation). While many people seem to talk about mail merge, I wouldn't have the slightest clue how to use it, or even what it is...

What I had in mind was to create a button on the form (or the database) which lets the user save it in the format of word document. However I have ABSOLUTELY NO IDEA how to do this or even where to start.

I realise that I should probably hit the books for a basic knowledge on how to do this, but any help on how I could go about doing this (or even what to look up in the books) would be GREATLY APPRECIATED.

Thnx!
 
Hi

One way to do this would be to use the OutputTo command.

See if this example helps:


Private Sub cmdOutputToWord_Click()

Docmd.OutputTo acOutputForm, "Example frm", acFormatRTF

Exit Sub


You'll need to substitute 'Example frm' and 'cmdOutputToWord' with the name of your form and button.

This example takes your form and exports the info as an RTF file which can be e-mailed and opened in Word. The DoCmd.OutputTo line as illustrated will prompt for a filename - you could include the filename as a parameter if you prefer.

I usually create a report if I want info to be read in Word - another option to think about.

hth

shay

:cool:
 
life saver!

ah~ shay u LEGEND! :)

It 'was' actually in a report format (silly me ;)) and ur single line of code did just the job I was looking for!
Tho whether it's what my boss was looking for is another matter hahah :rolleyes:

Thnx a bunch for ya help!
 
Last edited:
two reports into single .rtf file

After browsing through the entire forum, i've gathered that it's nearly impossible, if at all possible, to display the borders in .rft, correct?

The reason for the need of a ms word readable format is so that the forms can be edited then sent back to the editor.
I've realised that there are many other ways possible for this (ie. asp which most similar threads seem to lead to).
But as such major upgrading isn't an option here, I guess I'll have to stick to 'just' the requirements.

OK. so now I have further questions.
Because the reports are so long, they've been divided into two separate reports. What I've done so far is saving the two reports into two separate .rtf's. As this might get a little tedious for the editors, would there be a way to somehow append the second report onto the first .rtf file?

cheers, SF
 

Users who are viewing this thread

Back
Top Bottom