Hi all,

I have recorded a simple macro that saves the current sheet(s) as an HTML
file. My problem is that I do not know how to subsitute the file name in
the macro with a generic modifier for the file name of the current sheet.
The pertinent part of the macro looks like this:

  [snip]
  
  sub save_as_html
  rem ----------------------------------------------------------------------
  rem define variables
  dim document   as object
  dim dispatcher as object
  rem ----------------------------------------------------------------------
  rem get access to the document
  document   = ThisComponent.CurrentController.Frame
  dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
  
  rem ----------------------------------------------------------------------
  dim args1(2) as new com.sun.star.beans.PropertyValue
  args1(0).Name = "URL"
  args1(0).Value = "file:///home/mojo/Desktop/bridge-uge.html"
  args1(1).Name = "FilterName"
  args1(1).Value = "HTML (StarCalc)"
  args1(2).Name = "SelectionOnly"
  args1(2).Value = true
  
  dispatcher.executeDispatch(document, ".uno:SaveAs", "", 0, args1())

The problem with this is that whenever I execute the macro, the saved
html-file will always be called "bridge-uge.html", whereas I want it to
have the name of whatever the name of the current sheet is.

How do I substitute the value of this line

  args1(0).Value = "file:///home/mojo/Desktop/bridge-uge.html"

with a modifier that attains my object?


Thanks,

Morten

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to