Solved

Saving Access table data to RTF Format

Posted on 1998-07-09
9
320 Views
Last Modified: 2010-05-03
I want to SAVE access 97 database table records  as  RTF format or
word document. So How can I do it with Visual basic code.????/
There is a function called Transfer database. But not good enough is there any other way of doing it?
0
Comment
Question by:ozlem
9 Comments
 

Author Comment

by:ozlem
ID: 1465298
Edited text of question
0
 

Author Comment

by:ozlem
ID: 1465299
Edited text of question
0
 
LVL 9

Expert Comment

by:cymbolic
ID: 1465300
You can export it into a text file, then import it into Word.  Will that do it for you, or are you looking for some kind of repeating dynamic process?
0
 
LVL 1

Expert Comment

by:wford
ID: 1465301
what about to a html document, word97 reads them?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:ozlem
ID: 1465302
Yes, I am looking for some kind of repeating dynamic process.
0
 
LVL 3

Accepted Solution

by:
chapie earned 20 total points
ID: 1465303
if you are trying to do this in VB then I can only think of creating a recordset clone and manipulating it that way...I would probably drop an RTF (or text) control on a form, along with the data control and in the code do something like the following

dim rsRecords as recordset, intRecCount as integer

set rsRecords = me.datacontrolname.recordset.clone
intRecCount = 1

with rsRecords
  .movefirst
  do until .eof
    me.RTFcontrolName = rsRecords("FieldName")
    me.RTFcontrolName.SaveFile bstrFileName:="FileName" & intreccount
    .movenext
  loop
end with
0
 

Expert Comment

by:soeding1
ID: 1465304
ozlem,

do it manually:

- Query the database
- Create a new text document and write to it with RTF code, then save it as "xyz.rtf"

txt = "{\rtf\qc" _               ' this is a RTF document
& "{\b\fs12 " _                 ' bold, fontsize 12
& rec!MyTableField _       ' from your database
& "}}"
Open app.Path & "\xyz.rtf" For Output As #1
Print #1, txt
Close #1

- Create a RTF document in word, open it with a text editor.
Have a look for other available formats than 'bold' and 'fontsize'.

Regards
0
 

Author Comment

by:ozlem
ID: 1465305
Thanks a lot
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1465306
Bought This Question.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now