Solved

Saving Access table data to RTF Format

Posted on 1998-07-09
9
324 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 1

Expert Comment

by:wford
ID: 1465301
what about to a html document, word97 reads them?
0
 

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

770 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