Solved

Create a Word document using ASP and RTF Specification

Posted on 2006-06-16
5
336 Views
Last Modified: 2006-11-18
Hi,

I am creating the word document using ASP and RTF Specification. In the word document that i generate following needs to be implemented.

Font to be set to Arial
Some table cells background color should be set to red, yellow,light grey or green.
In the table cells verticalalignment and horizontal alignment are required.
Table border color should be set to black.

Could you please someone help me in implementing the above ones.

Mahesh.
0
Comment
Question by:thotamahesh
  • 4
5 Comments
 

Author Comment

by:thotamahesh
ID: 16922293
As of now i am using the following samle code for the background color but it is not working.

cTBL="{\colortbl;\red0\green0\blue0;\red0\green0\blue255;" & _
          "\red0\green255\blue255;\red0\green255\blue0;" & _
          "\red255\green0\blue255;\red255\green0\blue0;" & _
          "\red255\green255\blue0;\red255\green255\blue255;}"
MyFile.WriteLine(cTBL)

sRTF = "\trowd\trhdr\trgaph15\trleft20\trrh262" & _
          "\cellx1500\cellx3000\cellx4500\cellx6000\cellx7500\cellx9000" & _
          "\pard\intbl\ql\cb6\b Project Name \cb0\b0\par\cell" & _
          "\pard\intbl\ql XYZ \par\cell" & _
          "\pard\intbl\ql\b Project Manager \b0\par\cell" & _
          "\pard\intbl\ql ABC \par\cell" & _
              "\pard\intbl\ql\b Report Month \b0\par\cell" & _
          "\pard\intbl\ql June \par\cell" & _
          "\pard\intbl\row"
   MyFile.WriteLine(sRTF)


after including the cb6 also the background color is not set in my word document.
0
 
LVL 12

Accepted Solution

by:
peterxlane earned 500 total points
ID: 16922364
Create the document in Microsoft Word and save it as RTF.  Then open it up with Notepad to see how it should be formatted...

0
 

Author Comment

by:thotamahesh
ID: 16930402
when I create a the RTF document containing tables...if I open the RTF doc in notepad then junk charcaters are getting displayed.
0
 

Author Comment

by:thotamahesh
ID: 16930529
anyone can explain how my above problems can be solved.
it would be great if some sample code is provided.
0
 

Author Comment

by:thotamahesh
ID: 16941257
any one explain why the below 3 characters {,} and | characters are displayed on the generated RTF document. How to display those characters in the RTF document
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

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
A short film showing how OnPage and Connectwise integration works.

948 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

20 Experts available now in Live!

Get 1:1 Help Now