Command ID 7 & 8- set ParIsOutline flag

[Top]  [Chapter]  [Previous]  [Next]

ID 7:

Processes all paragraphs of the body text to select paragraphs to be used as PDF bookmark (outline).

 

StrParam="" - disables all WPAT.ParIsOutline property.

 

If the paragraph uses the style with the name provided as StrParam set the ParIsOutline level provided as Param. If Param = 0 or if the paragraph does not contain any text (objects are ignored) the property will be set to 0.

 

You can set the WPAT.ParIsOutline property in paragraph styles as well.

 

This command is a shortcut for the following C# code with the advantage that it does not modify the cursor position.

 

IWPTextCursor Cursor = Memo.TextCursor;

IWPParInterface CurrPar= Memo.CurrPar;

Cursor.CPPosition = 0;

bool next = true;

while (next)

{

         // Check for style =   "heading 1"

         if((CurrPar.StyleName=="heading 1") &&

         // Check if this paragraph contains any text (spaces and all objects are ignored)

                  (CurrPar.ParCommand(1,1,0xFFFF)!=1))

                  CurrPar.ParASet((int)WPAT.ParIsOutline,1);

         else CurrPar.ParADel((int)WPAT.ParIsOutline);

         next = Cursor.CPMoveNextPar(false);

}

 

Note: Use TextCommand(3) to create a TOC.

 

 

ID 8:

Processes all paragraphs of the body text to select paragraphs to be used as PDF bookmark (outline).

 

StrParam="" - disables all WPAT.ParIsOutline property.

 

If the paragraph starts with StrParam set the ParIsOutline level provided as Param. If Param = 0 the property will be set to 0.


[command_id_7___set_parisoutlin.htm]    Copyright © 2007 by WPCubed GmbH