WPCubed Product Support

Insert Page Count

Using D2009, WP 6.01. When I use the built in action I get the current page, not the page count. What am I doing wrong?

WPDefaultActions1.WPDefAct.WPAInsertPageCount.Execute;
#1 ♥ 0
4.8k Views 3 users read 1 min
rackerson

Unfortunately I don't have an answer to your exact problem but I thought I would share something that works for us (granted my Delphi version is 6 and I am using the latest WPTools - 6.0😎

Instead of using the action to retrieve the pagecount, I use the PageCount property of the editor itself. Works like a charm for us.

#2 ♥ 0
support

Hi,

Yes, it is better to access the methods directly.

Fields to display the pagecount, date etc can be inserted with InputTextField

function InputTextField(typ: TWPTextFieldType; FieldMask: string = ''): TWPTextObj;

TWPTextFieldType =
    (wpoPageNumber,
    wpoNextPage,
    wpoPriorPage,
    wpoNumPages,
    wpoDate,
    wpoTime,
    wpoSectionNumPages
    );

Julian

#3 ♥ 0

The stupid question: Why can't the action do the same as the suggested workaround? Wouldn't that fix what someone would call a bug?

The actions always work with "the current" editor. If there is no current editor it won't do anything. So the action is somewhat different the direct access of an objects interface. I see no bug here.

Julian

#4 ♥ 0
This category is archived. No new posts are possible.