Community
Showing results for 
Search instead for 
Do you mean 
Reply

Custom Field on envelope and VB Script

Accepted Solution Solved
vb
Copper Contributor
Posts: 36
Country: USA
Accepted Solution

Custom Field on envelope and VB Script

In Act 2007 I want to change the envelope template (any one of them, they all have the same guts) 

 

It currently uses the OnPrint VB script, field Custom4 to concatenate name prefix, first name, last name, and name suffix for the name line of the envelope.  I want to replace that with CONTACT plus another optional.  However, I don't know what to call CONTACT in the VB script.

 

Is there a list of valid field names that can be used in the VBscripts?

 

If not, what do I call CONTACT?  I'm not sure if should be CONTACT, CONTACT1, CONTACT2, etc.  What do the numbers mean?


Accepted Solutions
Solution
Accepted by topic author vb
‎09-25-2015 03:20 AM
Employee
Posts: 1,163
Country: USA

Re: Custom Field on envelope and VB Script

If you open the properties window while in the label editor (F4) you can see the names of the fields that have been added to the label in the drop down list. The name used in the script is the same as the name of the field in the label. So in our example:

 

Custom2.Text = ""

If City1 = NULL THEN
    Custom1.Text = City1&" "&State1&" "&ZIPCode1

..............

 

City1 is the name the field was given when we added it to the label. If we were to add the contact field to the label it would be Contact1 and you can verify this in the dropdown in the properties window.

Matthew Wood
Act! SDK Support
Community Moderator

View solution in original post


All Replies
Solution
Accepted by topic author vb
‎09-25-2015 03:20 AM
Employee
Posts: 1,163
Country: USA

Re: Custom Field on envelope and VB Script

If you open the properties window while in the label editor (F4) you can see the names of the fields that have been added to the label in the drop down list. The name used in the script is the same as the name of the field in the label. So in our example:

 

Custom2.Text = ""

If City1 = NULL THEN
    Custom1.Text = City1&" "&State1&" "&ZIPCode1

..............

 

City1 is the name the field was given when we added it to the label. If we were to add the contact field to the label it would be Contact1 and you can verify this in the dropdown in the properties window.

Matthew Wood
Act! SDK Support
Community Moderator