Reply to topic  [ 5 posts ] 
Word DOC import: List Styles 
Author Message

Joined: 2006-03-12 12:32:47
Posts: 138
Can a macro rename a list style? If so, I think a macro could improve the process of importing MS Word documents that include list formatting.

It appears to me that MS Word has named paragraph styles but does not have named list styles. In Word, paragraph styles include list formatting. In Nisus, Paragraph styles can incorporate list formatting only by reference to a named List style. Therefore, when importing a Word document, Nisus will create both a Paragraph style and a List style for each Word paragraph style that includes list formatting.

This would be perfect except for one shortcoming: When Nisus imports a Word doc, it is not apparent in the list of styles which List styles are associated with which Paragraph styles. Nisus' import function assigns to the list style associated with each imported paragraph style a generic name like "Number list 1" rather than giving it the same name as the associated paragraph style. Furthermore, the associated Paragraph style does not show a link to the List style.

I think the above confusion could be overcome by a macro, run immediately after importing a Word doc into Nisus, that does two things:

For every list style actually used in the document:

1. change the name of the list style to the name of the paragraph style applied to the text to which that list style is applied.

2. modify the paragraph style to add that list style as one of the parameters of the paragraph style.

Ultimately, it would be better to build these steps into the Word import process.


2013-12-04 23:23:53
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Bob Stern wrote:
Can a macro rename a list style? If so, I think a macro could improve the process of importing MS Word documents that include list formatting.

Yes, it can.
Code:
$doc = Document.active
$list_style = $doc.styleWithName ‘Old Name List’
$list_style.setName ‘New Name List’

You can also get all the list styles with a command like this:
Code:
$list_styles = $doc.listStyles

which you could then go through one at a time.

_________________
philip


2013-12-04 23:40:46
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
But to get to your main point:
Bob Stern wrote:
It appears to me that MS Word has named paragraph styles but does not have named list styles. In Word, paragraph styles include list formatting. In Nisus, Paragraph styles can incorporate list formatting only by reference to a named List style. Therefore, when importing a Word document, Nisus will create both a Paragraph style and a List style for each Word paragraph style that includes list formatting.

This would be perfect except for one shortcoming: When Nisus imports a Word doc, it is not apparent in the list of styles which List styles are associated with which Paragraph styles. Nisus' import function assigns to the list style associated with each imported paragraph style a generic name like "Number list 1" rather than giving it the same name as the associated paragraph style. Furthermore, the associated Paragraph style does not show a link to the List style.


I just tried this with some random document that I got from someone. OpenOffice tells me the document has two list styles applied called "WW8Num5" and "WW8Num6" (Both number lists?). In Nisus these styles show up as "Bullet List 1" and "Number List 1" (indeed one is a bullet list with a fancy Japanese style bullet). What's more this user has everything formatted as "Default Style" (the paragraph style). So apparently things don't really work like you describe above. If I attached either list style to "Default Style" every paragraph in the whole document would be numbered.

_________________
philip


2013-12-05 00:00:22
Profile

Joined: 2006-03-12 12:32:47
Posts: 138
Thanks for correcting me, Philip!

I inferred that Word cannot create named list styles based on:

1. My copy of Word 2008 for Mac.

2. Word documents I receive from a colleague in Taiwan using some version of Word for Windows. Of course, his failure to use list styles does not mean it isn't possible!


2013-12-05 00:06:39
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
I infer from your description of his document, that your friend in Taiwan is a rare instance of a Word user who knows how to use styles effectively. :)

_________________
philip


2013-12-05 00:14:27
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software