Outlook form with vbscript

C

Corey H.

I have a form that has check boxes. If I send the form, the blackberry
doesn't get any information about the checkboxes that were selected on the
form. Therefore, we created a vbscript that put the checked "checkboxes"
into the message area. It works great!
However, If I insert my signature into the form, or the signature is
automatically in the form due to the signatures being turned on, all of my
checkbox info drops itself "after" the typed message and signature. Is there
a way to paste it at the beginning of the message area?
 
S

Sue Mosher [MVP-Outlook]

Show the code that inserts the data, please

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
C

Corey H.

Sub Item_Send()
strBody = Item.Body
If Item.UserProperties("Telephoned") = True Then
strBody = strBody & vbCrLf & "Telephoned"
End If
If Item.UserProperties("PleaseCall") = True Then
strBody = strBody & vbCrLf & "Please Call"
End If
If Item.UserProperties("Confidential") = True Then
strBody = strBody & vbCrLf & "Confidential"
End If
If Item.UserProperties("WantstoSeeYou") = True Then
strBody = strBody & vbCrLf & "Wants to See You"
End If
If Item.UserProperties("CameToSeeYou") = True Then
strBody = strBody & vbCrLf & "Came To See You"
End If
If Item.UserProperties("ReturnedYourCall") = True Then
strBody = strBody & vbCrLf & "Returned Your Call"
End If
If Item.UserProperties("WillCallAgain") = True Then
strBody = strBody & vbCrLf & "Will Call Again"
End If
If Item.UserProperties("Rush") = True Then
strBody = strBody & vbCrLf & "RUSH!"
End If

Item.Body = strBody
End Sub
 
C

Corey H.

Also, I have a combination field linked to the subject line. When it's
inserted, the person on the receiving end is getting an error stating "form
cannot be opened".
Corey
 
S

Sue Mosher [MVP-Outlook]

When what's inserted?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

Your code appears to be doing exactly what you told it, appending everything to the existing Item.Body content, e,g.

strBody = strBody & vbCrLf & "Telephoned"

Instead, you might want to build strBody from the custom field data, then prefix it to Item.Body:

Item.Body = strBody & Item.Body
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
C

Corey H.

Sorry, let me rephrase.
I have a combination field linked to the subject line. When the combination
field is inserted onto the form; and the form then sent out, the person on
the receiving end is getting an error stating "form cannot be opened". If I
remove the combination field from the form, the form opens correctly, however
the combination function is no longer there.
What would be causing this?
Corey
 
S

Sue Mosher [MVP-Outlook]

It might help if you provided the formula for the combination field.

Also, what about using a regular text field and setting its value in the Item_Send event handler?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
C

Corey H.

The subject line code that is being used with the combination is: "Please
open, message from [caller] @ [phone]
 
S

Sue Mosher [MVP-Outlook]

So you don't have a combination field at all, but you're trying to set the value of the Subject property with a formula? And caller and phone are custom fields that appear in the "user-defined fields in this item" list on the All Fields page?

The formula to do this would look like:

"Please open, message from " & [caller] & " @ " & [phone]

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


Corey H. said:
The subject line code that is being used with the combination is: "Please
open, message from [caller] @ [phone]
 
C

Corey H.

We have the combination field set up on the "Edit Read Page" however, it's
hidden to the receiver of the form.

The setup of the combination is correct, . But because the combination
formula is located within the form (doesn't matter where on the form),
whoever is receiving the form can't open it due to the error "form cannot be
displayed"

Corey



Sue Mosher said:
So you don't have a combination field at all, but you're trying to set the value of the Subject property with a formula? And caller and phone are custom fields that appear in the "user-defined fields in this item" list on the All Fields page?

The formula to do this would look like:

"Please open, message from " & [caller] & " @ " & [phone]

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


Corey H. said:
The subject line code that is being used with the combination is: "Please
open, message from [caller] @ [phone]
Sorry, let me rephrase.
I have a combination field linked to the subject line. When the combination
field is inserted onto the form; and the form then sent out, the person on
the receiving end is getting an error stating "form cannot be opened". If I
remove the combination field from the form, the form opens correctly, however
the combination function is no longer there.
What would be causing this?

Also, I have a combination field linked to the subject line. When it's
inserted, the person on the receiving end is getting an error stating "form
cannot be opened".
I have a form that has check boxes. If I send the form, the blackberry
doesn't get any information about the checkboxes that were selected on the
form. Therefore, we created a vbscript that put the checked "checkboxes"
into the message area. It works great!
However, If I insert my signature into the form, or the signature is
automatically in the form due to the signatures being turned on, all of my
checkbox info drops itself "after" the typed message and signature. Is there
a way to paste it at the beginning of the message area?
 
S

Sue Mosher [MVP-Outlook]

I'm still not clear what the purpose of this combination field is.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


Corey H. said:
We have the combination field set up on the "Edit Read Page" however, it's
hidden to the receiver of the form.

The setup of the combination is correct, . But because the combination
formula is located within the form (doesn't matter where on the form),
whoever is receiving the form can't open it due to the error "form cannot be
displayed"

Corey



Sue Mosher said:
So you don't have a combination field at all, but you're trying to set the value of the Subject property with a formula? And caller and phone are custom fields that appear in the "user-defined fields in this item" list on the All Fields page?

The formula to do this would look like:

"Please open, message from " & [caller] & " @ " & [phone]

Corey H. said:
The subject line code that is being used with the combination is: "Please
open, message from [caller] @ [phone]
Sorry, let me rephrase.
I have a combination field linked to the subject line. When the combination
field is inserted onto the form; and the form then sent out, the person on
the receiving end is getting an error stating "form cannot be opened". If I
remove the combination field from the form, the form opens correctly, however
the combination function is no longer there.
What would be causing this?

Also, I have a combination field linked to the subject line. When it's
inserted, the person on the receiving end is getting an error stating "form
cannot be opened".
I have a form that has check boxes. If I send the form, the blackberry
doesn't get any information about the checkboxes that were selected on the
form. Therefore, we created a vbscript that put the checked "checkboxes"
into the message area. It works great!
However, If I insert my signature into the form, or the signature is
automatically in the form due to the signatures being turned on, all of my
checkbox info drops itself "after" the typed message and signature. Is there
a way to paste it at the beginning of the message area?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top