<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Change numbering pages with new style not working when set from within the macro"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=108048">108048</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Change numbering pages with new style not working when set from within the macro
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>5.3.3.2 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Writer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nvhorst@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>My document have some sections that must start on odd pages with new page
numbering.
It is than need to insert page break with new page style staring on the right
or left page and change page numbering to "1".
You can do this from menu: menu>insert>manual page break, choose new pagestyle
and tick the box to change page number to "1".
BUT
it is impossible to get the same result when executing above steps in recorded
macro because page numbering is continued despite setting PageNumber value.

Below is the code "tools>macro>record>"


dim args5(2) as new com.sun.star.beans.PropertyValue
args5(0).Name = "Kind"
args5(0).Value = 3
args5(1).Name = "TemplateName"
args5(1).Value = "Left Page"
args5(2).Name = "PageNumber"
args5(2).Value = 1 // THIS VALUE WILL NOT BE SET!
dispatcher.executeDispatch(document, ".uno:InsertBreak", "", 0, args5())</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>