Click or drag to resize

IDocumentGenerateDocumentFile Method

GenerateDocumentFile - copies the template and substitutes the given contact/person/project values. Returns false on failure. Creates a document and does the tag substitutions (template variables) according to the properties set on the document object. Will generate a filename based on the contact and template type if the target path is blank. Will use the correct file in the template directory in SO_ARC if the templateSource is blank. Copies the template and substitutes the given contact/person/project values

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
void GenerateDocumentFile(
	bool createMergeDraft = false,
	string templateFilePath = "",
	string outputFilePath = ""
)

Parameters

createMergeDraft (Optional)
Type: SystemBoolean
if true this will be a mailmerge draft, and the template variables will not be substituted
templateFilePath (Optional)
Type: SystemString
optional path to document template
outputFilePath (Optional)
Type: SystemString
optional path to finished document

Return Value

Type: 
Returns false on failure
Examples

GenerateDocumentFile

This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.

VB
dim objso
set objso = CreateObject("superoffice.application")
If not (objSO is nothing) Then
    set sodoc = objso.database.createdocument
    sodoc.setdefaults
    sodoc.contact = objso.currentcontact
    sodoc.header = "test of generatedocumentfile"
    sodoc.generatedocumentfile
    sodoc.save
else
    msgbox  "unable to connect to database"
end if
set objso = nothing

See Also