<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:rb.henschel@t-online.de" title="Regina Henschel <rb.henschel@t-online.de>"> <span class="fn">Regina Henschel</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Macro using com.sun.star.ui.dialogs.FilePicker (save as) stops working and presents "open" window"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=109093">bug 109093</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>rb.henschel@t-online.de
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Macro using com.sun.star.ui.dialogs.FilePicker (save as) stops working and presents "open" window"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=109093#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Macro using com.sun.star.ui.dialogs.FilePicker (save as) stops working and presents "open" window"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=109093">bug 109093</a>
              from <span class="vcard"><a class="email" href="mailto:rb.henschel@t-online.de" title="Regina Henschel <rb.henschel@t-online.de>"> <span class="fn">Regina Henschel</span></a>
</span></b>
        <pre>You need to initialize first, before calling setMultiSelectionMode.
Initialize with  com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_SIMPLE

Together this is:

Sub DDICSVsave
dim aUrl(), s$
dim oDlg as variant
dim fileProps(1) as new com.sun.star.beans.PropertyValue
fileProps(0).Name = "FilterName"
fileProps(0).Value = "Text - txt - csv (StarCalc)"
fileProps(1).Name = "FilterOptions"
fileProps(1).Value = "44,34,76,1,,0,false,true,true,false"
oDlg = createUnoService("com.sun.star.ui.dialogs.FilePicker")
dim listAny(0) as variant
listAny(0) = com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_SIMPLE
oDlg.initialize(listAny()) ' Speichern unter
oDlg.setMultiSelectionMode(false)
oDlg.execute
aUrl = oDlg.getFiles()
thisComponent.storeAsURL(aURL(0), fileProps())
End Sub</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>