|
-
Nov 10th, 2004, 05:31 PM
#1
Thread Starter
New Member
How to Concatenate rtf documents
Hello fellow developers,
I am trying to concatenate a number of rtf documents into one singe MS Word document. Any recommendations on how to do that programmatically ?
Thanks in advance for your help !
Terence
-
Nov 13th, 2004, 08:13 PM
#2
New Member
RTF is just a plain text file with markup -- RTF markup. Remove the last line of the first document, remove the first and last line of all the middle documents, and the first line of the last document that you append.
For example, here's a quick rtf file i made:
Code:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
{\colortbl ;\red255\green0\blue0;\red0\green0\blue0;}
\viewkind4\uc1\pard\b\f0\fs20 this is \cf1 a te\b0 st...\cf2 ewfop iwep ofiwopefi kwoefk\cf0\par
}
If I were to append this 2 additional copies of this, I'd remove the last curly brace form the first copy (because that tells the parser that the document has ended). I'd remove the header {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}} AND the last curly brace from the 2nd, and only the header fro mthe 3rd copy.
Devx has some pretty good rtf tutorials (http://www.devx.com/asp/Article/17964/1763/page/3)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|