Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access reporting & TransferText Method

Status
Not open for further replies.

jellybean

Programmer
Apr 18, 2001
4
0
0
IE
I'm new to this forum & to MSaccess so bear with me. By trade I am a Lotusnotes developer & have only beeen doing so for a few months.
My problem is this: I have a LNotes program that runs all day everyday. This Macro/Agent reads a field on Oracle. This Oracle field/column is a flag indicator. If the flag is yes then my program will look for a relevant file on the network.Then it sends an email to the relevant person with this text file attached. This file on the network is to be produced by an MSaccess db.
Presently the MSaccess db produces reports to a printer.This works fine :O).What I need is when the Access db is producing a report, I want it to also produce a copy of this report to a text/word file in the network or where ever !
What I need is some sort of a function or macro to do this.I need help in doing so.
I need syntax or an example to help me along. There are 30 differant reports produced under differant circumstances ie Overdue, reminder etc. They are all produced from the same program.
So can you help me ?
what is the best/easyist way to do this ?
I am a beginner in VB/Access & do really need the help.
Many thanks in advance Ü
Jellybean.
 
Outputting a text file is fairly easy, but won't be handsome. Outputting to a Word document will take some intense study of the Word object model--fairly advanced.

To write a text file, you'd use the following statements:
intOut = FreeFile()
Open "C:\Report.txt" For Output As #intOut
Print #intOut, data & vbCrLf
...
Close #intOut
Build each line as a string in the variable 'data', and write each as it is built.

To write a Word document, you need to understand how to use the Word objects Application, Document, Range, StoryRange, and possibly Header, Table, and Cell. Probably others as well. This is not a shallow learning curve, I warn you. Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top