TerMergePrintRep
Print a document without invoking an editor window (alternate function).
long TerMergePrintRep(hDC, file, hBuf, BufLen, rect, MergeFields, MergeData, StartPos, NextY)
long TerMergePrintRep2(hDC, file, hBuf, BufLen, rect, MergeFields, MergeData, StartPos, NextY, hAttribDC)
HDC hDC; | target device context |
LPBYTE file; | file name if the data is specified in a disk file, otherwise set to NULL. |
HGLOBAL hBuf; | Buffer handle if the data is supplied in a global buffer |
long BufLen; | buffer length if the data is supplied in a global buffer. |
RECT far *rect; | rectangle within which the printing is to take place. |
MergeFields; | Mail merge field names (NULL for default) |
MergeData; | Mail merge data string (NULL for default) |
long StartPos; | starting character position. |
LPINT NextY; | (output) This location receives the Y position after printing the entire buffer. |
HDC hAttribDC; | Attribute DC, if different from target DC, otherwise NULL. |
Description: This function provides a functionality similar to the TerMergePrint function. Please refer to the TerMergeField function for further description about the parameters. This function prints only one page at a time.
Return Value: This function returns the character position of the next page. It returns 0 if the last page is printed. It returns -1 if an error occurs.
Comments: This function is not available as an ActiveX control method. It must be used as a DLL function.