
Document #388, The DDE Macro &user_var Description
The &user_var macro allows GoldMine® users to store specific data that can be retrieved later into applications that are linked via DDE with GoldMine. This macro may be defined in the [user_var] section of both the GM.INI and the username.INI of GoldMine.
Syntax:
&user_var.<variable name>.<GoldMine username>
where <variable name> is a descriptive name of the macro and <GoldMine username> assigns a defined value to a specific GoldMine user. This item is optional as GoldMine will assign these values to the current GoldMine user.
To assign a defined value globally, i.e. for all GoldMine users, place the value in the GM.INI. Values that are user specific should go into each user’s username.INI. Any macro that is not used with a specific username and is not found within the GM.INI file will automatically default to the current GoldMine user.
DDE Macro &user_var Usage
Samples:
Users may rely on the following sample INIs as examples:
DAN.INI
[user_var]
Territory=California
SSN=000-00-0000
Pager=(310)555-1212
RICK.INI
[user_var]
Territory=South Bay
SSN=126-66-4001
GM.INI
[user_var]
Division=Printing Systems
FAX=(310)853-1212
Locale=Southern California
Pager=(310)853-2222
Now suppose we have a document that needs to print the Company name, locale, and Fax number as part of the heading. We also need to print the salesperson’s territory somewhere in the document. Because this is a large company and there are many divisions, we also want to specify what part of the company we are from. The document could look something like this (DDE macros are enclosed in []):
HUGE Corp., [&user_var.Locale]
[&user_var.Division]
FAX: [&user_var.FAX]
From: [&userfullname], [&user_var.Territory]
Greetings [&firstname]! Just wanted to drop you a note reminding you that my partner Dan is in charge of all accounts within [&user_var.Territory.Dan]. You can page Dan anytime at [&user_var.Pager.Dan] or myself at [&user_var.Pager].
Using Word, each code could be added by selecting Insert>>GoldMine Field (or GoldMine>>Insert GoldMine Field), then typing a macro name, i.e. &uservar.Locale then clicking OK.
If Rick Cooper is the GoldMine user and the contact is George Arbor, the results of the document would read:
HUGE Corp., Southern California
Printing Systems
FAX: (310)853-1212
From: Rick Cooper, South Bay
Greetings George! Just wanted to drop you a note reminding you that my partner Dan is in charge of all accounts within California. You can page Dan anytime at (310)555-1212 or myself at (310)853-2222.
Copyright (c) 2002 FrontRange Solutions Inc.
All rights reserved. You may use this document for personal and informational (non-commercial) purposes, provided that the copyright notice and all other notices and permissions appear in all copies, the document is not copied or posted on any network computer or broadcast in any media and modifications are not made to the document. Use for any other purpose is expressly prohibited by law, and may result in civil or criminal penalties.
The information contained in this document is provided “as is” without warranty of any kind. To the maximum extent permitted by applicable law, FrontRange Solutions disclaims all warranties, either express or implied, including warranties for quality, accuracy, merchantability, fitness for a particular purpose, title and non-infringement; and in no event shall FrontRange Solutions or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of profits or data or special damages, even if FrontRange Solutions or its suppliers have been advised of the possibility of such damages.