Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text and Image Formatting Issues

Status
Not open for further replies.

samflex

IS-IT--Management
Jun 28, 2004
45
US
I have a couple of questions.

I have an asp code that dumps the content of a database into a word document and sends this in an email as an attachment.

This works fine.
However, some of the issues we are having with this document are:

One, the text appears bold in a word document even though we didn't code it that way.

Second, the text appears smaller than 12pt font size.

Is there any way that someone can help me format this to look like a true word document?

For instance, a normal text, font size="12" face="Times New Roman" will suffice.

I tried this:

<FONT COLOR="#000000" FACE="Times New Roman" SIZE="12">This is some text</FONT>

is not working. I also need to indicate that it is normal, not bold.

The second question concerns an address, image and right hand info.

I will like an address information on the left, followed by image and Director info on the right.
All lined up correctly with out using a table because this will be dumped into a word doc.
I tried using a table but the table linings are also dumped into a word doc.

The admins who are using this doc don't want to make any changes to it.

Below is the code I am using for this second question.

Any help on any or all of the 2 issues will be greatly appreciated.


act.WriteLine("<body bgcolor='#FFFFFF'> " )
act.WriteLine("<center><IMG SRC=" & trim(rs("PWLogo")) & " BORDER=0 HEIGHT=115 WIDTH=90 </center>")
act.WriteLine("<h4><small>Department of Public Works&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Angela Bell<br>")
act.WriteLine("141 Pryor Street, S.W., Suite 6001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Acting Director<br>")
act.WriteLine("Detroit, MI 73104<br>")
act.WriteLine("Telephone: (351)730-7400 <br>")
act.WriteLine("Fax: (351)224-0978<br><br>")


Department of Public Works Angie Bell
141 Pryor Street, S.W., Suite 6001 Acting Director
Detroit, MI 73104
Telephone: (351)730-7400
Fax: (351)-224-0978 Image starts from here up and is in middle address on left and Director info on right.
 
My Recomendations are:
use a span style to make the font happen.
You are times new roman size 12 then I would put the text you want as so inside a span.

Code:
<span style="font:Times New Roman;font-size:12pt">THIS IS THE TEXT I WANT TIMES NEW ROMAN</SPAN>
or if you want to put the attribute inside a paragraph tag that would work just as well:
Code:
<p style="font:Times New Roman;font-size:12pt">This is the paragraph I want times new roman</p>

Word will process stylesheet information, I have used it in this fashion before.

Layout:
As long as you use the include the border="0" attribute in your table tag table borders will not print in Word. They may look like they will however they will not.

Purists do not like the use of tables for layout, and if the table borders that show up in Word dont work for the higher-ups then I would look in to laying out the picture and stuff using absolute positioning in with stylesheets.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top