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
Syntaxvoid GenerateDocumentFile(
bool createMergeDraft = false,
string templateFilePath = "",
string outputFilePath = ""
)
Sub GenerateDocumentFile (
Optional createMergeDraft As Boolean = false,
Optional templateFilePath As String = "",
Optional outputFilePath As String = ""
)
Dim instance As IDocument
Dim createMergeDraft As Boolean
Dim templateFilePath As String
Dim outputFilePath As String
instance.GenerateDocumentFile(createMergeDraft,
templateFilePath, outputFilePath)
void GenerateDocumentFile(
[InAttribute] bool createMergeDraft = false,
[InAttribute] String^ templateFilePath = L"",
[InAttribute] String^ outputFilePath = L""
)
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
ExamplesGenerateDocumentFile
This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.
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