Scripting - ExportSheetsAsHtml

I want to export a document as a set of HTML pages

doc.ExportSheetsAsHtml( HtmlFileName, DocumentName, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, 10, DocumentName, 0)

Gives me an error “Too few arguments…”
Are these functions described somewhere else as in the Report Script Basic Language Guide?

hans


Listserv Archives (BOB member since 2002-06-25)

Hans wrote:
ExportSheetsAsHTML gives me an error “Too few arguments…”

Are these functions described somewhere else as in the Report Script Basic Language Guide?

ExportSheetsAsHtml (BODocument Class)

Definition:

Function ExportSheetsAsHtml(FileName As String, SheetsName As String, Graphs As Boolean, Borders As Boolean, Background As Boolean, Foreground As Boolean, Font As Boolean, FreeForm As Boolean, Frames As Boolean, AutoRefreshTime As Long, BusObjDoc As Boolean, [HtmlLayout As Long]) As Long

Syntax:

objectvar.ExportSheetsAsHtml(fileName, sheetsName, graphs, borders, background, foreground, font, freeform, frames, autoRefresh, busObjDoc, [ HtmlLayout])

Example:

ExportSheetsAsHtml( HtmlFileName , DocumentName, 1,1,1,1,1,1,1,0,0,1)

Location:

Report Script Editor Help File

Shawn Leven
Southwestern Bell
Information Services
SL7699@SBC.COM


Listserv Archives (BOB member since 2002-06-25)

Exactly Leven,
There is no example in the help file. Only the part you send. That gives the error: too few arguments. The help file isn’t much of a help when there is no working sample. I tend to disbelieve any documentation until proven right.

hans

ExportSheetsAsHtml( HtmlFileName , DocumentName, 1,1,1,1,1,1,1,0,0,1)


Listserv Archives (BOB member since 2002-06-25)

This is a script which I use and describes each formatting option.

Example:

This script sends the entire document to a server as HTML

dim BO_Doc as BODocument
Set BO_Doc = ActiveDocument
call BO_Doc.ExportSheetsAsHtml("\MyServer\My_Share"+ BO_Doc.Name, BO_Doc,1,1,1,1,1,1,1,0,0,1)

The options that are set are:

FileName = BO_Doc.Name
SheetsName = BO_Doc (i.e. ActiveDocument, all sheets)
Graphs = 1 (Yes)
Borders = 1 (Yes)
Background = 1 (Yes)
Foreground = 1 (Yes)
Font = 1 (Yes)
FreeForm = 1 (Yes)
Frames = 1 (Yes)
RefreshTime = 0 (No…don’t autorefresh, therefore zero
seconds)
BusObjDoc = 0 (No… I don’t want the BO Document to be
downloaded from the web)
HtmlLayout = 1 (optional, if omitted assumes the default)
HtmlLayout to specify the type of page layout: 0 = All in one page. This is the default. 1 = Show each section of the report on a separate page.
A table of contents column appears on the left of the page.
2 = Both. A table of contents column appears on the left of the page.

Hope this helps.

Shawn Leven
Southwestern Bell
Information Services
SL7699@SBC.COM


Listserv Archives (BOB member since 2002-06-25)