Reading the Font style of bullets and numbering in a doc file

R

Renjith

Hi All,
I am trying to develop a software, in VB to automate some formatting in
Word. I am facing two problems Now.
1. I want to save individual pages in a doc file without changes in the
formatting. I tried it by inserting bookmarks at the page. This works but
only in No column text. In docs with columns, the formatting disappear. How
can I solve this problem?
2. I want to get the information about the font style and Name of the
bullets used in a doc file. how it can be done?

Please help me on this.
 
D

Daiya Mitchell

1. I want to save individual pages in a doc file without changes in the
formatting. I tried it by inserting bookmarks at the page. This works but
only in No column text. In docs with columns, the formatting disappear. How
can I solve this problem?
Columns are created by section breaks, and getting section breaks to copy
and paste can be a bit tricky. See here:
http://www.mvps.org/word/FAQs/Formatting/WorkWithSections.htm
2. I want to get the information about the font style and Name of the
bullets used in a doc file. how it can be done?
Er, haven't a clue, but you probably need to say what information exactly?
Just font, or the applied style?

Probably on both of these questions you will need to post in a group with
VBA in the name, at some point, if you are trying to automate this.
 
J

Jezebel

Saving individual pages without changing formatting is not easy, because so
much of the formatting depends on preceding pages. Do you need to edit these
pages? If not, convert the document to PDF, then extract the pages
individually.

The details of the bullet fonts is buried in the ListTemplate structure. The
font used on my system for 'Bullet' style is:
activedocument.Styles("Bullet").ListTemplate.ListLevels(1).Font.Name

Finding all of these in the document is something of a nightmare: any given
paragraph might or might not be bulleted, and if so might or might not use
one of the bulleted styles. Each bulleted paragraph and style might have any
number of listlevels, each with its own font settings.
 
R

Renjith

Hi

This is working!!! Thank you very much. But now the question asyou
mentioned below is how to differentiate between Bulletted and Non-Bulletted
paragraphs. Any idea how to solve this problem?? I was able to segragate page
content, but the formatting goes weired. I am still trying for a solution.

Thanks and Regards
Renjith R Nair

Jezebel said:
Saving individual pages without changing formatting is not easy, because so
much of the formatting depends on preceding pages. Do you need to edit these
pages? If not, convert the document to PDF, then extract the pages
individually.

The details of the bullet fonts is buried in the ListTemplate structure. The
font used on my system for 'Bullet' style is:
activedocument.Styles("Bullet").ListTemplate.ListLevels(1).Font.Name

Finding all of these in the document is something of a nightmare: any given
paragraph might or might not be bulleted, and if so might or might not use
one of the bulleted styles. Each bulleted paragraph and style might have any
number of listlevels, each with its own font settings.
 
J

Jezebel

Renjith said:
Hi

This is working!!! Thank you very much. But now the question asyou
mentioned below is how to differentiate between Bulletted and Non-Bulletted
paragraphs. Any idea how to solve this problem??

Dim pPar as word.paragraph
For each pPar in Activedocument.Paragraphs
If not pPar.Range.ListFormat.ListTemplate is nothing then
... Bulleted
end if
Next
 
R

Renjith

Thank You very Much. This issue was becoming a big problem for me. It has
been solved. Thanks Again. Now I have to save individual pages without
changes in formatting.

Thanks Once Again
Renjith
 
Top