OOutputStream = createUNOService (“.TextOutputStream”) OSimpleFileAccess = createUNOService (“.SimpleFileAccess”) PS - MeanWhile i tryied the fallowing code and it saved ok Is the FilterNames ok? Is there some way of uncomment this Msgbox? ’ Msgbox(“Document cannot be saved under '” & ConvertFromUrl(sPath) & “’”, 48, GetProductName()) Now, i wonder if FilterName = FilterNames(0,1) = “*.odt” is ok!?īecause while debugging, after “iAccept = oStoreDialog.Execute()=ok”, it jumps direct into I changed this from the original code but something is not OK?!ĭim FilterNames(1,2) As String, sResult As String, sPath As StringįilterNames(0,0) = “ODF Text Document (. In you Oriiginal example was about scalc. tOutputStream(oSimpleFileAccess.openFileWrite(sFileName)) OOutputStream = createUNOService (".TextOutputStream") OSimpleFileAccess = createUNOService (".SimpleFileAccess") OFilePicker.DisplayDirectory = ConvertToURL("C:\Users\mydocs\Desktop\") OFilePicker.appendFilter("Planilha ODF (*.ods)","*.ods") OFilePicker = CreateUnoService(".dialogs.OfficeFilePicker") All attempts failed, so I’m asking for help. I know how to do it without a dialog, but I need it. It uses a sub to save it (save File sub) but it does as a Write file no matter the properties set in the dialog box. I’m trying to use the following code to save a file as a calc file (extension “.ods”).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |