Solved

Saving Access table data to RTF Format

Posted on 1998-07-09
9
327 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

688 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