SetServerPrinterData method

The data associated with each index defaults to the empty string. Any data set using this method is retained until changed.

Method
short SetServerPrinterData(
short Index,
char * pData )
Parameters
Index
Specifies the server printer data index. It must be one of the following values found in ARSLOEEX.H:
ARS_OLE_SERVER_PRINTER_DATA_FAX_
RECEIVER_NAME

ARS_OLE_SERVER_PRINTER_DATA_FAX_
RECEIVER_COMPANY

ARS_OLE_SERVER_PRINTER_DATA_FAX_
RECEIVER_FAX_NUMBER

ARS_OLE_SERVER_PRINTER_DATA_FAX_
SENDER_NAME

ARS_OLE_SERVER_PRINTER_DATA_FAX_
SENDER_COMPANY

ARS_OLE_SERVER_PRINTER_DATA_FAX_
SENDER_TEL_NUMBER

ARS_OLE_SERVER_PRINTER_DATA_FAX_
SENDER_FAX_NUMBER

ARS_OLE_SERVER_PRINTER_DATA_FAX_
SENDER_COVER_PAGE

ARS_OLE_SERVER_PRINTER_DATA_FAX_
SUBJECT

ARS_OLE_SERVER_PRINTER_DATA_FAX_
NOTES

ARS_OLE_SERVER_PRINTER_DATA_INFO_
FROM

ARS_OLE_SERVER_PRINTER_DATA_INFO_
TO
pData
Points to a null-terminated character string containing the data to be associated with the index. This parameter might be null.
Description
If pData is null, the data is reset to the empty string. When the PrintDoc method is used and a server printer is specified, the type of printer (such as FAX) is determined and the appropriate data is sent along with the document.
Return Value
Refer to return codes.
See Also
PrintDoc method

C/C + +

The following example sets the FAX receiver name for server printers.
 CArsOle * pArsCtrl;
 short rc;
   .
   .
   .

 rc = pArsCtrl->SetServerPrinterData(
                   ARS_OLE_SERVER_PRINTER_DATA_FAX_RECEIVER_NAME,
                   "John Doe" );
 if ( rc != ARS_OLE_RC_SUCCESS )
   ERROR;

   .
   .
   .

Visual Basic

 Dim rc As Integer

  .
  .

 rc = ArsOle.SetServerPrinterData (
                ARS_OLE_SERVER_PRINTER_DATA_FAX_RECEIVER_NAME,
                "John Doe");
 If rc <> ARS_OLE_RC_SUCCESS Then
    MsgBox "ERROR"
    End
 End If

  .
  .