Recruiting Software

Automating RESUMate using DDE

TechNote « Return to Support

Introduction

There is an unsupported feature in RESUMate which lets you automate the program in a very simple fashion. It uses an older Windows technology called Dynamic Data Exchange (DDE). We've used this feature in RESUMate to automate some of our in-house utilities, and are making this document available to anyone wishing to try and do the same.

Again, this is an unsupported feature of the program. We are unable to educate you in how DDE works, or how to get started (beyond the instructions here), and there is programming knowledge required in order to take advantage of this feature. If you have a specific question or difficulty, we will do our best to help you, but cannot guarantee that your question will be answered.

Getting Started

First, you must have RESUMate itself running; the DDE interface was written primarily to retrieve information from the currently displayed record. Second, you must have some other application running that can act as a DDE client. This includes Microsoft Word, for which some sample code is provided below.

The following settings are required, regardless of which client you use to create the DDE link:

Application: "RESUMate 11" (could also be "RESUMate 10", "RESUMate 2006", "RESUMate 2005", "RESUMate 2003" - it simply has to match your version of RESUMate)
Topic: "MDIFrame"
Item: "lblDDEItem"

Commands

In addition to the Application, Topic, and Item settings, you need to supply a command through your client to the RESUMate application (acting as the DDE server). This command specifies an action for RESUMate to perform, or is a request for a certain piece of information relating to the currently displayed record.

For commands with parameter values, the command is followed by a colon character (:), which is required in your code, and the parameters have been enclosed in the following brackets: <>
These bracket characters should not be included in your code; they are only shown here for the sake of clarity.

Information Retrieval Commands

The following commands retrieve corresponding values from the current record of the top-most window.

Telephone:<Description>
Get the telephone number with the appropriate description.

Checkmarks:~Title~:<ColumnTitle> ~After~:<Item> ~Before~:<Item>
Retrieve classification items for the current record. You can optionally limit this to a certain column (by specifying the ~Title~: parameter), as well as a certain section within that column (by using the ~After~: and ~Before~: parameters).

Memo:<Title>
Retrieve the plain text version of the named memo.

Item:<ItemName>
The Item command returns the contents of the named field. Each type of window (Person, Company, and Job Order) has its own list of valid item names. In all three cases, you must use the generic field name for the user-definable text and date fields (Text1, Text2, Date1, Date2, etc). The numbering of these fields corresponds to their positions on the screen, and can also be confirmed on the File/Database/Tools/Settings window, where the corresponding labels are set.

Person Window: FirstName, MiddleName, LastName, UserId, Country, AddressLine1, AddressLine2, AddressLine3, City, State, ZipCode, Text1, Text2, Text3, Text4, Text5, Text6, Date1, Date2, Date3, Date4, Date5, Date6, CompanyName, CompanyCountry, CompanyLine1, CompanyLine2, CompanyLine3, CompanyCity, CompanyState, CompanyZip

For the person window, the "Company" fields refer to the directly linked company, if there is any, which appears just below the six date fields and above the six text fields.

Company Window: Name, UserId, Country, AddressLine1, AddressLine2, AddressLine3, City, State, ZipCode, Text1, Text2, Text3, Text4, Text5, Text6, Text7, Text8, Date1, Date2, Date3, Date4

Job Order Window: JobTitle, JobActive, UserId, Text1, Text2, Text3, Text4, Text5, Text6, Text7, Text8, Text9, Text10, Date1, Date2, Date3, Date4, Date5, Date6

Action Commands

The following commands perform some type of action in RESUMate. They should be used with caution, and should only be tested after making a current backup of your database file.

Open Database:<RDBFileName>
Opens the specified RDB file, which should include the full path to the folder containing the file.

Close Database
Closes the currently open database.

Open Person
Opens the main candidate/contact window.

Open Company
Opens the main company window.

Open JobOrder
Opens the main job order window.

Open Calendar
Opens the calendar window.

Go First
Moves to the first record in the top-most window.

Go Previous
Moves to the previous record in the top-most window.

Go Next
Moves to the next record in the top-most window.

Go Last
Moves to the last record in the top-most window.

SetControl:<ItemName>:=<Value>
Set's the corresponding item for the top-most window to the passed value. See the above listing of valid item names.

SaveWindow
Saves any changes for the top-most window.

Sample Word Document Code

Following is some sample code adapted from a document we use here at RESUMate. The primary purpose of this code is to grab the current record's name and address, and fill the information into corresponding fields (with the appropriate bookmark labels) in a Word document.

You can download the sample word document containing this code at the following link:
http://www.resumate.com/docs/RESUMateDDESample.doc

Please note that for this sample to work, you must enable macros in Word, and have RESUMate running.

Public Sub SetRESUMateAddress()

Dim Channel As Long
Dim sFirstName As String
Dim sLastName As String
Dim sAddressLine1 As String
Dim sAddressLine2 As String
Dim sCity As String
Dim sState As String
Dim sZipCode As String

' Replace this with your actual version of RESUMate
Const AppName = "RESUMate 11"

On Error Resume Next

' Initiate a "DDE Channel" with the appropriate
' application name and topic.
Channel = DDEInitiate(AppName, "MDIFrame")
If Err.Number <> 0 Then
MsgBox Prompt:="Please start RESUMate first.", Buttons:=vbOKOnly + vbExclamation

Exit Sub
End If

' Next, execute the first DDE command.
DDEExecute Channel, "Item:FirstName"

' Now use DDERequest to get the item's value.
' The return value of DDERequest() is what you're
' looking for. The command is always:
' DDERequest(Channel, "lblDDEItem")
sFirstName = DDERequest(Channel, "lblDDEItem")

' Continue issuing commands, and checking
' return values...
DDEExecute Channel, "Item:LastName"
sLastName = DDERequest(Channel, "lblDDEItem")

DDEExecute Channel, "Item:AddressLine1"
sAddressLine1 = DDERequest(Channel, "lblDDEItem")

DDEExecute Channel, "Item:AddressLine2"
sAddressLine2 = DDERequest(Channel, "lblDDEItem")

DDEExecute Channel, "Item:City"
sCity = DDERequest(Channel, "lblDDEItem")

DDEExecute Channel, "Item:State"
sState = DDERequest(Channel, "lblDDEItem")

DDEExecute Channel, "Item:ZipCode"
sZipCode = DDERequest(Channel, "lblDDEItem")

' Now, set the values retrieved for the
' corresponding fill-in fields on the Word
' document itself. Each fill-in field needs
' to have an appropriate bookmark label.
ActiveDocument.FormFields("FirstName").Result = sFirstName
ActiveDocument.FormFields("LastName").Result = sLastName
ActiveDocument.FormFields("AddressLine1").Result = sAddressLine1
ActiveDocument.FormFields("AddressLine2").Result = sAddressLine2
ActiveDocument.FormFields("City").Result = sCity
ActiveDocument.FormFields("State").Result = sState
ActiveDocument.FormFields("ZipCode").Result = sZipCode

' Clean up the DDE session.
DDETerminateAll

End Sub


Copyright © 2010 - RESUMate, Inc. « Return to Support