473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Write Formatted text in a doc file

I am getting some data 'strData' from database through reader object.
The data 'strData' is sent to a doc using FilesystemObject line by line
in doc file located on a specific location.

1.Code for writting line to doc is:

//////////////////
Dim objReader As StreamWriter
objReader = New StreamWriter(FullPath)
objReader.Write(strData)
objReader.Close()
//////////////////////////
I want to write the formatted text in doc file like change the colour
of text and size

Any help will be Appreciated

Regards
Amit(Sonu)

May 2 '06 #1
3 4015
Hello,
I want to write the formatted text in doc file like change the colour
of text and size


Did I understand you correctly that you are reading (plain text?) data from
a database, and would like to write that data with some formatting to a
file?

If so, then in what format the database data is? Is it already formatted?
And, what kind of formatting would you like to use in the file? Without more
information I'm afraid we cannot help you much.

Thanks!

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
May 2 '06 #2
Hi Jani,
Thanks for reply.

suppose i got some data from database in a datareader and if i write
this data in doc file that data will be stored in that file in simple
way.

and when u see that file,the data will be displayed in a line in that
doc file.

I want to display the data in doc file in formatted way.. like the Text
color in that doc file scould be red size should be 5 and that data
should be displayed in table.

Regards
Amit

May 3 '06 #3
Hello Amit,
I want to display the data in doc file in formatted way.. like the Text
color in that doc file scould be red size should be 5 and that data
should be displayed in table.


If you want to format the document file, you could use simple HTML or for
instance RTF. Depending on your application, you could either create this
data in HTML or RTF format yourself (not that difficult), or you could use
Word through OLE Automation (COM) which gives you all the formatting
features that Word has. But this usually isn't a good option if your
application is a web application (ASP.NET) for example.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
May 3 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jason Heyes | last post by:
I am starting to worry about the performance of formatted read/write operations on data-redundant objects in my program.What can I do to improve this performance should it become an issue? ...
6
by: dale zhang | last post by:
Hi, I am using StreamWriter to write text files now. What is the easiest way to write a word table to a file? XML + style? Thanks. -Dale
2
by: David | last post by:
Hi, My asp.net application is writing a few xml files based on certain criteria. the application works like this. 1. read an xml template using LoadXML. 2. manipulate the xml and add certain...
3
by: Craig Petrie | last post by:
Hi, I have a large table in Word 2003 that has formatted text in the cells and wish to read and convert a cells formatted contents to html output via vb.net code. The formatting contains the...
4
by: sm | last post by:
Hi All, When I write to a file using the Write method, #ERROR 448# is written to the file instead of the string being sent! Has anybody come across this problem? Thanks in advance.
5
by: Just Me | last post by:
Using streams how do I write and then read a set of variables? For example, suppose I want to write into a text file: string1,string2,string3 Then read them later. Suppose I want to write...
0
by: =?Utf-8?B?YW5rMmdv?= | last post by:
Hi, Thanks in advance for reading this. Not sure where to post this question, but I hope someone in here can help. Trying to write to Event Log in VS 2005 (.NET 2.0) using Enterprise Library...
9
by: NEWSGROUPS | last post by:
I have data in a table in an Access 2000 database that needs to be exported to a formatted text file. For instance, the first field is an account number that is formatted in the table as text and...
0
by: satarupa | last post by:
I want to read the formatted (bold,underline,italics) text of a word dcoument using c# i can read the document even the paragraphn in it but not the formatted text plzz help following is the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.