![]() |
|
#4
|
|||
|
|||
|
I have determined the following when converting html to Word...
Code:
<P Class=MsoBodyText>Body Text Test</P> <P Class=MsoListNumber>Body Text Test</P> <Ol> <LI Class=MsoListNumber>Testing</LI> <OL> The LI tag is recognised by the HTML editor as a list item, but is not recognised by word as a style. However... Code:
<Ol> <LI Class=MsoListNumber><P Class=MsoBodyText>Testing</P></LI> <OL> The question then remains, how can I set the Paragraph inside the List? This is a basic example of how I'm setting the class for the <LI> element Code:
Dim rng as MSHTML.IHTMLTxtRange Dim rngElement as MSHTML.HTMLDDElement Set rng =WBControl.Object.Document.selection.CreateRange Set rngElement = rng.ParentElement rngelement.classname ="MsoListNumber" Or perhaps I'm going about this the wrong way. To start with, I have text. How can I embed that text into both the LI tag and the P tag - such as above example? Cheers |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
HTML Class to Word Styles
|
Journeyman | Word VBA | 4 | 08-17-2023 09:03 PM |
Displaying in the Styles Pane Only the Styles You Actually Use -- Which Was a Snap in Word 2003
|
RobertB | Word | 4 | 08-09-2022 09:29 AM |
| Locking styles in Word using VBA to restrict new styles | cadillac1206 | Word VBA | 1 | 04-21-2020 01:08 AM |
Self-created styles in Word to appear when converting to HTML
|
anapat | Word | 2 | 05-11-2013 09:40 PM |
| Can you actually write HTML and CSS in a word document and send it as an html page | jackaroo | Word | 0 | 07-12-2010 07:49 AM |