Solved

Create a Word document using ASP and RTF Specification

Posted on 2006-06-16
5
335 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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 …
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

708 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

17 Experts available now in Live!

Get 1:1 Help Now