Jak zamienić aktualną nazwę pliku do zapisania po wywołaniu makra?
Makro eksportuje aktywny arkusz do PDF

kod:

Sub ExportPDF

'Get Active Sheet
    dim document   as object
    dim dispatcher as object
    dim oSheet as object

   document   = ThisComponent.CurrentController.Frame
   dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
   oSheet = thiscomponent.getcurrentcontroller.activesheet

'Get Print Range - if no print range has been defined for the Active Sheet, then it will export the entire Active Sheet
   dim aFilterData(0) as new com.sun.star.beans.PropertyValue
   aFilterData(0).Name = "Selection"
   aFilterData(0).Value = oSheet

'Export to PDF
    dim args1(1) as new com.sun.star.beans.PropertyValue
    args1(0).Name = "FilterName"
    args1(0).Value = "calc_pdf_Export"
    args1(1).Name = "FilterData"
    args1(1).Value = aFilterData()

    dispatcher.executeDispatch(document, ".uno:ExportDirectToPDF", "", 0, args1())
    'File Done (added this next line so that user knows when file is complete)

End Sub

tym podbieram konkretną komórkę w której jest gotowa nazwa, tu G3

DIM oDoc, oSheet1, oCell
   oDoc = ThisComponent.CurrentController.Frame
   oSheet1 = thiscomponent.getcurrentcontroller.activesheet
   oCell = oSheet.getCellRangeByName("G3")

i co dalej jak zamienić oCell.string na nazwę która pojawia się w momencie zapisu pliku ?