EndMailMergeSetup

MailMerge Functions

Minor Business Rule

Object Name: B9800911

Parent DLL: CWRKFLOW

Location: Client

Language: C

Functional Description

Purpose

This function will call the API MMEndMailMergeSetup that will end the mailmerge environment. 


Setup Notes and Prerequisites

The function B9800911, InitMailMerge and StartMailMergeSetup , need to be called first to initialize the mailmerge environment.


Special Logic

The input parameter to the API MMEndMailMergeSetup is the window handle (lpBhvrCom->hDlg). 


Technical Specification


Parameters:

DataItem Data StructureI/ORequiredNotes

Description



Processing 


1.Call the API MMEndMailMergeSetup, passing to it the window handle (lpBhvrCom->hDlg).




Data Structure

D9800911 - Insert MailMerge Field data structure

Parameter NameData ItemData TypeReq/OptI/O/Both
szDescription001DL01charOPTNONE

A user defined name or remark.

Related Functions

None

Related Tables

None
GetMailMergeTempDirectory

GetMailMergeTempDirectory

MailMerge Functions

Minor Business Rule

Object Name: B9800911

Parent DLL: CWRKFLOW

Location: Client

Language: C

Data Structure

D9800911H - Get Window's Temp Directory

Parameter NameData ItemData TypeReq/OptI/O/Both
szTempDirectoryWRKDIRcharREQOUTPUT

The working directory describes where the application is located on your computer or network. The path should include the drive, folders, 
and subfolders that contain the application.

Related Functions

None

Related Tables

None
GetMediaObjectFileName

GetMediaObjectFileName

MailMerge Functions

Minor Business Rule

Object Name: B9800911

Parent DLL: CWRKFLOW

Location: Client

Language: C

Functional Description

Purpose

This function will call the API MMGetFilePath and given the window handle, it will return the queue 
name and the compound filename for the associated media object in the calling application.


Setup Notes and Prerequisites


Special Logic

The input parameters to the API MMGetFilePath are the window handle (lpBhvrCom->hDlg).


Technical Specification


Parameters:

Data Item Data Structure I/ORequiredNotes
Description

QUPATHszQueuePathOYQueue Path

MOFILEszFileNameOYMedia Object File Name


Processing
 

1.Call the API MMGetFilePath, passing to it the window handle (lpBhvrCom->hDlg).  It will pass back 
szQueuePath and szFileName associated with the media object attached to the calling window.







^

Data Structure

D9800911G - Get MailMerge Media Object File Name

Parameter NameData ItemData TypeReq/OptI/O/Both
szQueueNameQUNAMcharOPTNONE

The value entered is used to define a Media Object queue name where images may be found. The queue name is a symbolic reference 
only. The Media Object queue name is one half of a properly defined Media Object queue. The other half is the Media Object path. NOTE: 
OLEQUE is a reserved queue name. It must be defined as it is used as the default queue name in the OLE object attachment mode of Media 
Objects. It is mandatory that this queue name be defined in order to use OLE object attachments.

szFileName9MOFILEcharOPTNONE

The name of the file, excluding suffix or path, containing a media object.

Related Functions

None

Related Tables

None
GetWindowsTempDirectory

GetWindowsTempDirectory

MailMerge Functions

Minor Business Rule

Object Name: B9800911

Parent DLL: CWRKFLOW

Location: Client

Language: C

Functional Description
Returns the Microsoft Window's temporary directory.

Purpose

Provide the ability to identify the Microsoft Window's temporary directory from Event Rules.

Setup Notes and Prerequisites

This is a Microsoft Window's Client-Only business function.  This cannot be run on a server.


Special Logic

Calls the Win32 function, getvar().



Technical Specification




^

Data Structure

D9800911H - Get Window's Temp Directory

Parameter NameData ItemData TypeReq/OptI/O/Both
szTempDirectoryWRKDIRcharREQOUTPUT

The working directory describes where the application is located on your computer or network. The path should include the drive, folders, 
and subfolders that contain the application.

Related Functions

None

Related Tables

None
InitMailMerge

InitMailMerge

MailMerge Functions

Minor Business Rule

Object Name: B9800911

Parent DLL: CWRKFLOW

Location: Client

Language: C

Functional Description

Purpose

This function will call the API MMInitMailMerge that will initialize the environment to get it ready 
to work with Microsoft Word as a mailmerge document.  Microsoft Word will be used inside of a media 

object.  This function is necessary when creating a new Microsoft Word mailmerge document, modifying an 

existing document, or creating a final mailmerge document.


Setup Notes and Prerequisites

This function is needed to be called before calling any of the following functions within B9800911:  

InsertMailMergeField, StartMailMergeSetup, EndMailMergeSetup, SetupNewTemplate, and RunMailmerge. 


Special Logic

There are no input parameters into this API call.  The API returns an integer, indicating the status 

of the call.


Technical Specification


Parameters:

Data Item Data Structure I/ORequiredNotes
Description

INT01CErrorCodeOError Code



Processing 


1.Call the API MMInitMailMerge.  The API call will return zero, if successful.



^

Data Structure

D9800911A - Initialize MailMerge

Parameter NameData ItemData TypeReq/OptI/O/Both
nInteger01INT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

Related Functions

None

Related Tables

None
InsertMailMergeField

InsertMailMergeField

MailMerge Functions

Minor Business Rule

Object Name: B9800911

Parent DLL: CWRKFLOW

Location: Client

Language: C

Functional Description

Purpose

This function will call the API MMAddMailMergeField that will take an input string and insert it as a 
 mailmerge field into a Microsoft Word media object. 


Setup Notes and Prerequisites

The functions in B9800911:  InitMailMerge and StartMailMergeSetup , need to be called first to 

initialize the mailmerge environment.  If a mailmerge document does not already exist, it is necessary to 

call B9800911: SetupNewTemplate. 


Special Logic

The input parameters to the API MMAddMailMergeField are the window handle (lpBhvrCom->hDlg) and a 

string which contains the value of the name of the mailmerge field.


Technical Specification


Parameters:

Data Item Data Structure I/ORequiredNotes
Description

DL01szDescription001IYMailMerge field name


Processing 


1.Call the API MMAddMailMergeField, passing to it the window handle (lpBhvrCom->hDlg) and a string 
(szDescription001) which contains the value of the name of the mailmerge field.






^

Data Structure

D9800911 - Insert MailMerge Field data structure

Parameter NameData ItemData TypeReq/OptI/O/Both
szDescription001DL01charOPTNONE

A user defined name or remark.

Related Functions

None

Related Tables

None
PrintMergedDoc

PrintMergedDoc

MailMerge Functions

Minor Business Rule

Object Name: B9800911

Parent DLL: CWRKFLOW

Location: Client

Language: C

Functional Description

Purpose

This function will call the API MOPrintOleDoc, passing to it the window handle (lpBhvrCom->hDlg). 
This will print the media object to the client's default printer.


Setup Notes and Prerequisites


Special Logic

The input parameter to the API MOPrintOleDoc is the window handle (lpBhvrCom->hDlg).


Technical Specification


Parameters:

Data Item Data Structure I/ORequiredNotes
Description

DL01SzDescription001Dummy parameter, not used


Processing
 

1.Call the API MOPrintOleDoc, passing to it the window handle (lpBhvrCom->hDlg).







^

Data Structure

D9800911 - Insert MailMerge Field data structure

Parameter NameData ItemData TypeReq/OptI/O/Both
szDescription001DL01charOPTNONE

A user defined name or remark.

Related Functions

None

Related Tables

None
RunMailMerge

RunMailMerge

MailMerge Functions

Minor Business Rule

Object Name: B9800911

Parent DLL: CWRKFLOW

Location: Client

Language: C

Functional Description

Purpose

This function will call the API MMRunMailMerge.  This will produce a merged Microsoft Word document.

Setup Notes and Prerequisites

The function B9800911:  InitMailMerge needs to be called first to initialize the mailmerge 

environment.


Special Logic

The input parameters to the API MMRunMailMerge are the window handle (lpBhvrCom->hDlg), the media 

object file name, the queue name, a local file name (if desired), and a print option. 


Technical Specification


Parameters:

Data Item Data Structure I/ORequiredNotes
Description

MOFILEszHeaderFileIHeader File

MOFILEszTemplateNameIMailMerge Document File Name

QUNAMQueueNameIThe name of the queue where the media 

objects are stored

QUPATHszQueuePathIThe path where the media objects are 

stored

INT01nMailMergeTypeIThe type of mailmerge (1 = form letter, 

2 = labels)

MOFILEszLocalFileILocal File Name where the 

completed merged document will reside

INT01nPrintIPrint parameter 0 = Do not print 1 = 

Print mailmerge document directly to printer



Processing 


Call the API MMRunMailMerge, passing to it the window handle (lpBhvrCom->hDlg), szFileName, 

szQueueName, szLocalFile, and nPrint.







^

Data Structure

D9800911F - Run MailMerge data structure

Parameter NameData ItemData TypeReq/OptI/O/Both
szHeaderFileMOFILEcharOPTNONE

The name of the file, excluding suffix or path, containing a media object.

szTemplateNameMOFILEcharOPTNONE

The name of the file, excluding suffix or path, containing a media object.

szQueueNameQUNAMcharOPTNONE

The value entered is used to define a Media Object queue name where images may be found. The queue name is a symbolic reference 
only. The Media Object queue name is one half of a properly defined Media Object queue. The other half is the Media Object path. NOTE: 
OLEQUE is a reserved queue name. It must be defined as it is used as the default queue name in the OLE object attachment mode of Media 
Objects. It is mandatory that this queue name be defined in order to use OLE object attachments.

szDataFileMOFILEcharOPTNONE

The name of the file, excluding suffix or path, containing a media object.

nMailMergeTypeINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

szLocalFileMOFILEcharOPTNONE

The name of the file, excluding suffix or path, containing a media object.

nPrintFlagINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

szHeaderNewDTA1charOPTNONE

A 256 byte field used to hold miscellaneous data.

szDataNewDTA1charOPTNONE

A 256 byte field used to hold miscellaneous data.

szLocalFileNewDTA1charOPTNONE

A 256 byte field used to hold miscellaneous data.

Related Functions

None

Related Tables

None
SetupNewTemplate

SetupNewTemplate

MailMerge Functions

Minor Business Rule

Object Name: B9800911

Parent DLL: CWRKFLOW

Location: Client

Language: C

Functional Description

Purpose

This function will call the API MMSetupNewTemplate that will take a Microsoft Word document and 
define it to be a mailmerge primary document. 


Setup Notes and Prerequisites

The functions in B9800911: InitMailMerge and StartMailMergeSetup, need to be called first to 

initialize the mailmerge environment.


Special Logic

The input parameters to the API MMSetupNewTemplate are the window handle (lpBhvrCom->hDlg), header 

filename, datafile name, and an integer indicating type of mailmerge document. 


Technical Specification


Parameters:

Data Item Data Structure I/ORequiredNotes
Description

MOFILEszHeaderFileIYHeader File Name

MOFILEszDataFileIYData File Name

INT01nMergeTypeIYMailMerge Type 1 = Form Letter (The API 

MMSetupNewTemplate does not handle any other mailmerge 

types at this time.)

Processing 


1.Call the API MMSetupNewTemplate, passing to it the window handle (lpBhvrCom->hDlg), ), header 
filename szHeaderFile,  datafile name szDataFile, and an integer indicating type of mailmerge document 

INT01.







^

Data Structure

D9800911E - New MailMerge Setup Data Structure

Parameter NameData ItemData TypeReq/OptI/O/Both
szHeaderFileMOFILEcharOPTNONE

The name of the file, excluding suffix or path, containing a media object.

szDataFileMOFILEcharOPTNONE

The name of the file, excluding suffix or path, containing a media object.

nMergeTypeINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

szHeaderNewDTA1charOPTNONE

A 256 byte field used to hold miscellaneous data.

szDataNewDTA1charOPTNONE

A 256 byte field used to hold miscellaneous data.

szQueueNameQUNAMcharOPTNONE

The value entered is used to define a Media Object queue name where images may be found. The queue name is a symbolic reference 
only. The Media Object queue name is one half of a properly defined Media Object queue. The other half is the Media Object path. NOTE: 
OLEQUE is a reserved queue name. It must be defined as it is used as the default queue name in the OLE object attachment mode of Media 
Objects. It is mandatory that this queue name be defined in order to use OLE object attachments.

Related Functions

None

Related Tables

None
StartMailMergeSetup

StartMailMergeSetup

MailMerge Functions

Minor Business Rule

Object Name: B9800911

Parent DLL: CWRKFLOW

Location: Client

Language: C

Functional Description

Purpose

This function will call the API MMStartMailMergeSetup, passing to it the window handle 
(lpBhvrCom->hDlg). 


Setup Notes and Prerequisites

The function B9800911, InitMailMerge, needs to be called first to initialize the mailmerge 

environment.


Special Logic

The input parameter to the API MMStartMailMergeSetup is the window handle (lpBhvrCom->hDlg).


Technical Specifications


Data Item Data Structure I/ORequiredNotes
Description

DL01SzDescription001Dummy parameter, not used



Processing 


1.Call the API MMStartMailMergeSetup, passing to it the window handle (lpBhvrCom->hDlg).




^

Data Structure

D9800911 - Insert MailMerge Field data structure

Parameter NameData ItemData TypeReq/OptI/O/Both
szDescription001DL01charOPTNONE

A user defined name or remark.

Related Functions

None

Related Tables

None
ValidateMailMergeTemplateName

ValidateMailMergeTemplateName

MailMerge Functions

Minor Business Rule

Object Name: B9800911

Parent DLL: CWRKFLOW

Location: Client

Language: C

Data Structure

D9800911I - Validate Mail Merge Template Name

Parameter NameData ItemData TypeReq/OptI/O/Both
szNameObjectOBNMcharREQINPUT

The name that identifies a system object. J.D. Edwards ERP architecture is object-based. Discrete software objects are the building blocks 
for all applications, and developers can reuse the objects in multiple applications. The Object Librarian tracks each object. Examples of 
system objects include:   o Batch Applications (such as reports)   o Interactive Applications   o Business Views   o Business Functions   o 
Business Functions Data Structures   o Event Rules   o Media Object Data Structures

cInvalidCharsYNEV01charOPTOUTPUT

An option that specifies the type of processing for an event.

Related Functions

None

Related Tables

None