Click or drag to resize
AceoffixCtrlBind Method
Binds the data source object to the AceoffixCtrl.

Namespace: Aceoffix
Assembly: Aceoffix (in Aceoffix.dll) Version: 5.0.0.1
Syntax
public void Bind(
	Object SourceObj
)

Parameters

SourceObj
Type: SystemObject
Data source object. Available object types are WordDocument and Workbook.
Remarks

When output data to Word document or Excel workbook, you must create a data source object and call Bind method.

If you need to call Bind method, you must call it before calling OpenDocument or CreateNewDocument method.

Note Note
The type of SourceObj parameter should be the same as the type of document opened through OpenDocument method. For example, if SourceObj is a WordDocument object, the OpenDocument method should open a Word document.
Examples

The following code example shows how to use the Bind method.

Word code example:

Aceoffix.WordWriter.WordDocument wd = new Aceoffix.WordWriter.WordDocument();
Aceoffix.WordWriter.DataRegion dataRegion = wd.OpenDataRegion("name");
dataRegion.Value = "John Scott";
AceoffixCtrl1.Bind(wd); //The data source is a WordDocument object.

Excel code example:

Aceoffix.ExcelWriter.Workbook wb = new Aceoffix.ExcelWriter.Workbook();
Aceoffix.ExcelWriter.Sheet sheetOrder = wb.OpenSheet("Order");
sheetOrder.OpenCell("B5").Value = "John Scott";
AceoffixCtrl1.Bind(wb); //The data source is a Workbook object.
See Also