Solved

Saving Access table data to RTF Format

Posted on 1998-07-09
9
322 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

929 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

8 Experts available now in Live!

Get 1:1 Help Now