activeなブックを名前を変えて保存する場合は、
ThisComponentのstoreAsURLで可能となります。
strUrl = ConvertToUrl(“/Users/username/Desktop/testNewName.ods”)
ThisComponent.storeAsURL(strUrl, Array())
ファイルパスを全て書かないといけないところが
面倒です。
ファイル名だけを変更したいので、
パスとファイル名に分割しました。
sub ksSaveAs
dim path_url as string
dim title as string
dim path_dir_url as string
dim newFileName as string
dim newPath as string
path_url = ThisComponent.getLocation()
title = ThisComponent.getTitle()
path_dir_url = Left(path_url, Len(path_url) – Len(title))
newFileName = “testNewSheets”
newPath = path_dir_url & newFileName
msgbox newPath
ThisComponent.storeAsURL(newPath, Array())
end sub