I’v a problem with a method from word COM in AX.
I create a table in a word document with X++ and I want that the first row of this table repeat on every new pages like a header.
There is a method ‘HeadingFormat’ with com object Row that I can use for.
When I set the parameter ‘False’, it works. But when I try to set the parameter ‘True’, I received the following error message :
“Method ‘HeadingFormat' from class COM Object 'Row' return error code 0x80070057 (E_INVALIDARG), that mean : One or many arguments are not valid. “
I don’t understand why parameter ‘True’ doesn’t work like parameter ‘False’. That is a boolean parameter required !! Did someone have any ideas ??
I’ve the same problem with method ‘AllowBreakAcrossPages’.
This is my code :
--> If ‘_allowSplit’ or ‘_repeatAsHeader’ = false, that’s ok, method works correctly. If they’re true, it returns the error !
-->_COMRow is the specified row in the table.
void tableRowFormat(COM _COMRow, int _height, boolean _allowSplit, boolean _repeatAsHeader)
{
//Set Row formatting
;
if (_hight != 0)
{
_COMRow.height(_height);
}
_COMRow.HeadingFormat(_repeatAsHeader);
_COMRow.AllowBreakAcrossPages(_allowSplit);
}
I don't find any helps anywhere about that, thanks for your help !