Creating document with Report

Carlos Marques

New member
Local time
Yesterday, 21:25
Joined
Apr 16, 2007
Messages
2
People,

I have one report in an Access DB that nowadays is only used for printing.
Instead of it, I want to save this as Word file document.

Is there anything that I can do that only generate the .doc or the procedure is much different?

The code that I use for printing is:

Code:
Private Sub Print_Rep_Buttom_Click()

DoCmd.OpenForm ("Aviso de Impressao")
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "Atualiza PL", acNormal, acEdit
    DoCmd.OpenQuery "Atualiza Flag de PL7F na tabela Main", acNormal, acEdit
    DoCmd.OpenReport "SNP", acNormal, "", ""
    DoCmd.Close acReport, "SNP"
    DoCmd.Close acForm, "Main"
    DoCmd.SetWarnings True

End Sub

Tks all,
Carlos
 
Carlos, I've never tried this, but there is an icon in the tool bar that says Analyze it with MS Word. It is probably a variant way of opening the document or of outputing it. But be warned, you won't REALLY output it to Word. Oh, it will SAY it is Word, but you won't get a .DOC file. You will get a .RTF, which has lesser formatting abilities.

I presume your report is complex enough that a Mail Merge won't do what you want? Because you can automate a Mail Merge.
 
No, my report is not that complex.

Do you have some tip or some site for me to learn about mail merge?


Tks,
Carlos
 
create a button on your form. in that button set it to open a macro when clicked.

in the macro, just set action to "Outputto"
than in the bottom sections just fill out the details of the object type, name, format, filename
 

Users who are viewing this thread

Back
Top Bottom