I did It :)
instead of using a macro i rebuilt the macro with php com functions
the problem i have in general with this is that for example the function for counting pages in vb is:
count = ActiveDocument.ComputeStatistics(wdStatisticPages)
But the PHP function is not:
$count = $word->ActiveDocument->ComputeStatistics('wdStatisticPages');
but:
$count = $word->ActiveDocument->ComputeStatistics(2);
Do you know a page with a good documentation for all these come functions where i can see wich integer stands for wich parameter in the functions?
for the other solutions:
upgrading is not an option at the moment (budget this year is closed) and i did not get LibreOffice to work in invisible mode at all on the server
regards