Basic: how do I remove the PNG options popup

asked 2018-12-08 06:19:47 +0100

Todd2 gravatar image

updated 2018-12-08 06:28:02 +0100

Hi All,

I have a sub that saves a png. It pops up a "Png Options" window:

Png Pop Up

How do I get rid of this pop up and just accept the default values (same as pressing the okay button)?

This the code in question:

Public sub ExportTable( TableName As String )
   dim document   as object
   dim dispatcher as object
   dim MsgRtn     as Integer

   ' rem get access to the document
   document   = ThisComponent.CurrentController.Frame
   dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

   dim args1(0) as new com.sun.star.beans.PropertyValue
   args1(0).Name = "Nr"
   args1(0).Value = 2

   dispatcher.executeDispatch(document, ".uno:JumpToTable", "", 0, args1())

   dim args2(0) as new com.sun.star.beans.PropertyValue
   args2(0).Name = "ToPoint"
   args2(0).Value = "$A$1:$I$21"

   dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args2())

   dim args3(3) as new com.sun.star.beans.PropertyValue
   args3(0).Name = "URL"
   args3(0).Value = "file:///" + TableName
   args3(0).Value = Replace( args3(0).Value, "\", "/" )
   ' MsgRtn = MsgBox( args3(0).Value, 0, "ExportTable" )
   args3(1).Name = "FilterName"
   args3(1).Value = "calc_png_Export"
   args3(2).Name = "FilterData"
   args3(2).Value = Array(Array("Compression",0,6,com.sun.star.beans.PropertyState.DIRECT_VALUE),Array("Interlaced",0,1,com.sun.star.beans.PropertyState.DIRECT_VALUE),Array("Translucent",0,1,com.sun.star.beans.PropertyState.DIRECT_VALUE),Array("PixelWidth",0,767,com.sun.star.beans.PropertyState.DIRECT_VALUE),Array("PixelHeight",0,748,com.sun.star.beans.PropertyState.DIRECT_VALUE),Array("LogicalWidth",0,20291,com.sun.star.beans.PropertyState.DIRECT_VALUE),Array("LogicalHeight",0,19788,com.sun.star.beans.PropertyState.DIRECT_VALUE))
   args3(3).Name = "SelectionOnly"
   args3(3).Value = true

   dispatcher.executeDispatch(document, ".uno:ExportTo", "", 0, args3())
end sub
edit retag flag offensive close merge delete

Comments

Anyone? (1234 to meet minimum letters)

Todd2 gravatar imageTodd2 ( 2018-12-13 20:56:10 +0100 )edit