IEstimateVersion.CreateWordDocument Method

Creates either Docx, Docm, PDF or XPS documents from the current estimate.
Sub CreateWordDocument( _ 
ByVal SourceFile As String, _ 
ByVal TargetFile As String, _ 
Optional ByVal RenderThroughWordAnyway As Boolean = False, _ 
Optional ByVal MacroToBeExecuted As String = "" _ 
)
This language is not supported or no code example is available.
void CreateWordDocument( 
string SourceFile
string TargetFile
bool RenderThroughWordAnyway = False, 
string MacroToBeExecuted = "" 
)
This language is not supported or no code example is available.

Parameters

SourceFile
string

The full path to the source file, either Docx or Docm.

TargetFile
string

The full path to the target file (which mustn't exist). Either Docx, Docm, PDF or XPS.

RenderThroughWordAnyway
bool

Optional. The default value is false. If set to true, then the document is processed through Word even if PDF or XPS is requested. This is useful to use features which are not natively handled by QDV like updating table of contents. It is useful also to render PDF/XPS using Word and use the powerful Word engine for this. But it is significantly slower and Word 2010 or higher must be installed on the machine.

When false, PDF and XPS documents are rendered directly, in a faster way and it doesn't need Word at all. Notice that in this case, pages in the table of contents cannot be updated.

MacroToBeExecuted
string

Optional. The default value is "". You can provide here the name of a macro to be executed under Word after the document is created. Providing a macro name implicitly sets RenderThroughWordAnyway to true.

Exception type Condition

QdvApiException

A problem occurred.

Version
 
Available since QDV 7.13.0001.

.NET Framework

Supported in: 4.8, 4.7, 4.6, 4.5.2

In this article

Definition