Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Conversions / October 2005

Tip: Looking for answers? Try searching our database.

Getting font properties of text in between paragraphs

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Abhishek - 12 Oct 2005 08:51 GMT
Hi!

I am writing a code that needs to get all the font changes done in a doc.
I am able to get the font of the paragraph with the Paragraph.range.font but
with this I am unable to get the font changes or variations in between the
paragraphs

I need to know of all the changes/settings done within the doc related to
font.

Abhishek
Tony Jollans - 12 Oct 2005 13:44 GMT
I'm not entirely sure what sort of result you want when you talk about font
_changes_, but there are two possible ways to find all fonts used in a
document ...

1) Check each character and see what font it is
2) Check each font and search the document for it

Which is better might depend on the document being checked and/or the number
of available fonts on the machine.

--
Enjoy,
Tony

> Hi!
>
[quoted text clipped - 7 lines]
>
> Abhishek
Abhishek - 13 Oct 2005 07:32 GMT
> I'm not entirely sure what sort of result you want when you talk about
> font
> _changes_, but there are two possible ways to find all fonts used in a
> document ...
>
> 1) Check each character and see what font it is
How do I go about this?
I'll try and explain what exactly is my requirement
I need to form my own XML/HTML displaying only the textual part but with
complete formatting.
Therefore I need to know each place where font is changing or as you
mentioned Check each character and see what font it is

Here is an example of what I need
This is an XML generated from Word I need it simple format
<w:p>
- <w:r>
 <w:t>This testing is for the conversion of Word doc to flash and also to
test for</w:t>
 </w:r>
- <w:r>
- <w:rPr>
 <w:b />
 </w:rPr>
 <w:t>BOLD</w:t>
 </w:r>
- <w:r>
 <w:t>and</w:t>
 </w:r>
- <w:r>
- <w:rPr>
 <w:i />
 </w:rPr>
 <w:t>ITALICS</w:t>
 </w:r>
- <w:r>
 <w:t>and this is</w:t>
 </w:r>
- <w:r>
- <w:rPr>
 <w:u w:val="single" />
 </w:rPr>
 <w:t>UNDERLINE</w:t>
 </w:r>
- <w:r>
 <w:t>and this is</w:t>
 </w:r>
- <w:r>
- <w:rPr>
 <w:b />
 <w:i />
 <w:u w:val="single" />
 </w:rPr>
 <w:t>BOLD,ITALICS,AND UNDERLINE</w:t>
 </w:r>
 </w:p>

I need it like

<p><font name="Times New Roman" size="10">This testing is for the conversion
of Word doc to flash and also to test for<b>BOLD</b>and
 <i/> ITALICS</i>and this is<u> UNDERLINE</u>and this is
 <b><i><u> BOLD,ITALICS,AND UNDERLINE</b></i></u></font></p>

> 2) Check each font and search the document for it
>
[quoted text clipped - 5 lines]
> Enjoy,
> Tony
Tony Jollans - 14 Oct 2005 17:46 GMT
I'm sorry I don't know enough about XML to help you but you seem to want
simple HTML. Have you tried saving as a web page and working with that
rather than the XML (or even looking at what is generated in the Script
Editor (Alt+Shift+F11))

--
Enjoy,
Tony

> > I'm not entirely sure what sort of result you want when you talk about
> > font
[quoted text clipped - 69 lines]
> > Enjoy,
> > Tony
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.