A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tags: , ,

Phone Message - Custom





 
 
Thread Tools Display Modes
  #11  
Old October 11th 06, 11:03 PM posted to microsoft.public.outlook.program_forms
Corey H.
external usenet poster
 
Posts: 18
Default Phone Message - Custom

No disrespect, but I am asking a specific question

Hopefully my explanation here can make my question more understandable.

TO: ________________________________________

COMPANY : __________________________________

PHONE: _____________________________________

MESSAGE____________________________________
X X
X X
X X
X X
X X
X___________________________________________ X

Lets say that the above is the form. Where the underlines are there is a
text box in which you fill in the information. So say I wanted to collect
the information that was entered into the text box next to Phone, and the
text box next to Company. then have it submitted into the text box upon
hitting send, what would the vbscript need to look like? These are bound
text boxes.







"Sue Mosher [MVP-Outlook]" wrote:

When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.


Then you're probably going to need to learn more about basic Outlook programming. It's difficult for us to know what you don't know or what you need to know until you ask a specific question.

This is a "custom phone message form" as in the subject line.


As I said, in a message form, the details about the recipients in the "To" box are in the Item.Recipients collection. The Item.To property will give you only a display name or address -- whatever you see in the UI. What information do you want to extract and put in the message body? For example, this code snippet builds a string of the addresses for all recipients:

For Each recip in Item.Recipients
strAddr = strAddr & ";" & recip.Address
Next
strAddr = Mid(strAddr, 2)

If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?


I would examine the controls to see what field each one is bound to and then write code to build a string from the values in those fields (or in unbound controls if that's what the form uses), just as you did in the code you originally posted.

If I wanted some fancy formatted HTML, I'd write functions that would allow me to input plain text and return formatted text. Only you, of course, know what kind of formatting you have in mind. There are many basic HTML tutorials on the Internet if you don't know anything about HTML formatting.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Corey H." wrote in message ...
Sue,
This is a "custom phone message form" as in the subject line.
When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.
I'd take screen shots and send them to you so you could see what I'm dealing
with. But, I'm unable to paste into a text field on these responses.
If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?
Corey



"Sue Mosher [MVP-Outlook]" wrote:

I need that attached text box information to be entered into the message box.

If it's a message form, that information is in the Recipients collection. If it's a Post form, which has no Recipients collection, you'd need to use CDO 1.21 or, to avoid security prompts, Redemption to get to the recipients. Each recipient has a name and address.

You never said what kind of form this is, by the way.



"Corey H." wrote in message ...
I'm not exactly sure why we're using html coding for this.
If you use the field chooser to drop the TO: field onto your form, it drops
the box for selecting addresses from your global if you're on exchange. And
drops the information you select from the global into the attached text box.
I need that attached text box information to be entered into the message box.

The other vbscripting for the checkboxes gets the information from an If
then function. If "True", paste into the message area.
Where this would be "take this final value and paste it into the message
area".
I hope that makes sense.


"Sue Mosher [MVP-Outlook]" wrote:

No, that's just the snippet you don't seem to already have. p/p is the HTML element that creates a new paragraph. If you want a proper HTML message, you'd use that tag along with any desired formatting tags to build the final string, using the same technique you already know for getting Outlook property values. To get the right font tags, create text similar to what you want to show in an HTML editor and then take a look at the HTML source.

"Corey H." wrote in message ...
And this is for the text boxes?
In the To: field, the entry changes.
Same for the Company: field, and the Phone: field.
So the user of the form actually types the information into this text box
field.
I just want to take the final value of those fields and enter it into the
message body.

So is the vbscript still strBody = "pTelephoned/p"?

"Sue Mosher [MVP-Outlook]" wrote:

strBody = "pTelephoned/p" etc.


"Corey H." wrote in message ...
And the vbscript for that would look how??
Corey


"Sue Mosher [MVP-Outlook]" wrote:

Then you'd set HTMLBody, not Body and your strBody would need to include all the HTML formatting you want to show.

"Corey H." wrote in message ...
This vbscript is great for returning a set value.
But what if you needed to display font in a text area of the form that
always changes per call, and paste it within the message body.

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



Ads
  #12  
Old October 11th 06, 11:32 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Phone Message - Custom

The VBScript would look very much like what you posted in your original code, with the addition of the data from the extra fields that you have below (which we don't know the names of).

We've already covered a lot of ground on basic property syntax, HTML coding, extracting recipient names from the Recipients collection, etc. and your original code showed that you're on the right track. Is there some specific stumbling block that is preventing you from tying up the loose ends?
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Corey H." wrote in message news
No disrespect, but I am asking a specific question

Hopefully my explanation here can make my question more understandable.

TO: ________________________________________

COMPANY : __________________________________

PHONE: _____________________________________

MESSAGE____________________________________
X X
X X
X X
X X
X X
X___________________________________________ X

Lets say that the above is the form. Where the underlines are there is a
text box in which you fill in the information. So say I wanted to collect
the information that was entered into the text box next to Phone, and the
text box next to Company. then have it submitted into the text box upon
hitting send, what would the vbscript need to look like? These are bound
text boxes.


"Sue Mosher [MVP-Outlook]" wrote:

When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.


Then you're probably going to need to learn more about basic Outlook programming. It's difficult for us to know what you don't know or what you need to know until you ask a specific question.

This is a "custom phone message form" as in the subject line.


As I said, in a message form, the details about the recipients in the "To" box are in the Item.Recipients collection. The Item.To property will give you only a display name or address -- whatever you see in the UI. What information do you want to extract and put in the message body? For example, this code snippet builds a string of the addresses for all recipients:

For Each recip in Item.Recipients
strAddr = strAddr & ";" & recip.Address
Next
strAddr = Mid(strAddr, 2)

If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?


I would examine the controls to see what field each one is bound to and then write code to build a string from the values in those fields (or in unbound controls if that's what the form uses), just as you did in the code you originally posted.

If I wanted some fancy formatted HTML, I'd write functions that would allow me to input plain text and return formatted text. Only you, of course, know what kind of formatting you have in mind. There are many basic HTML tutorials on the Internet if you don't know anything about HTML formatting.

"Corey H." wrote in message ...
Sue,
This is a "custom phone message form" as in the subject line.
When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.
I'd take screen shots and send them to you so you could see what I'm dealing
with. But, I'm unable to paste into a text field on these responses.
If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?
Corey



"Sue Mosher [MVP-Outlook]" wrote:

I need that attached text box information to be entered into the message box.

If it's a message form, that information is in the Recipients collection. If it's a Post form, which has no Recipients collection, you'd need to use CDO 1.21 or, to avoid security prompts, Redemption to get to the recipients. Each recipient has a name and address.

You never said what kind of form this is, by the way.



"Corey H." wrote in message ...
I'm not exactly sure why we're using html coding for this.
If you use the field chooser to drop the TO: field onto your form, it drops
the box for selecting addresses from your global if you're on exchange. And
drops the information you select from the global into the attached text box.
I need that attached text box information to be entered into the message box.

The other vbscripting for the checkboxes gets the information from an If
then function. If "True", paste into the message area.
Where this would be "take this final value and paste it into the message
area".
I hope that makes sense.


"Sue Mosher [MVP-Outlook]" wrote:

No, that's just the snippet you don't seem to already have. p/p is the HTML element that creates a new paragraph. If you want a proper HTML message, you'd use that tag along with any desired formatting tags to build the final string, using the same technique you already know for getting Outlook property values. To get the right font tags, create text similar to what you want to show in an HTML editor and then take a look at the HTML source.

"Corey H." wrote in message ...
And this is for the text boxes?
In the To: field, the entry changes.
Same for the Company: field, and the Phone: field.
So the user of the form actually types the information into this text box
field.
I just want to take the final value of those fields and enter it into the
message body.

So is the vbscript still strBody = "pTelephoned/p"?

"Sue Mosher [MVP-Outlook]" wrote:

strBody = "pTelephoned/p" etc.


"Corey H." wrote in message ...
And the vbscript for that would look how??
Corey


"Sue Mosher [MVP-Outlook]" wrote:

Then you'd set HTMLBody, not Body and your strBody would need to include all the HTML formatting you want to show.

"Corey H." wrote in message ...
This vbscript is great for returning a set value.
But what if you needed to display font in a text area of the form that
always changes per call, and paste it within the message body.

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



  #13  
Old October 12th 06, 12:01 AM posted to microsoft.public.outlook.program_forms
Corey H.
external usenet poster
 
Posts: 18
Default Phone Message - Custom

Yes and here is the stumbling block.
After the TO: field, anyone can insert the name from Outlook or Exchange. I
don't know the coding because the text information entered varies from phone
call to phone call. So how can you enter that into your vbscript?

Wouldn't the coding be:
strBody1 = strbody1 & Item.UserProperties("Caller") &
Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")



"Sue Mosher [MVP-Outlook]" wrote:

The VBScript would look very much like what you posted in your original code, with the addition of the data from the extra fields that you have below (which we don't know the names of).

We've already covered a lot of ground on basic property syntax, HTML coding, extracting recipient names from the Recipients collection, etc. and your original code showed that you're on the right track. Is there some specific stumbling block that is preventing you from tying up the loose ends?
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Corey H." wrote in message news
No disrespect, but I am asking a specific question

Hopefully my explanation here can make my question more understandable.

TO: ________________________________________

COMPANY : __________________________________

PHONE: _____________________________________

MESSAGE____________________________________
X X
X X
X X
X X
X X
X___________________________________________ X

Lets say that the above is the form. Where the underlines are there is a
text box in which you fill in the information. So say I wanted to collect
the information that was entered into the text box next to Phone, and the
text box next to Company. then have it submitted into the text box upon
hitting send, what would the vbscript need to look like? These are bound
text boxes.


"Sue Mosher [MVP-Outlook]" wrote:

When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.

Then you're probably going to need to learn more about basic Outlook programming. It's difficult for us to know what you don't know or what you need to know until you ask a specific question.

This is a "custom phone message form" as in the subject line.

As I said, in a message form, the details about the recipients in the "To" box are in the Item.Recipients collection. The Item.To property will give you only a display name or address -- whatever you see in the UI. What information do you want to extract and put in the message body? For example, this code snippet builds a string of the addresses for all recipients:

For Each recip in Item.Recipients
strAddr = strAddr & ";" & recip.Address
Next
strAddr = Mid(strAddr, 2)

If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?

I would examine the controls to see what field each one is bound to and then write code to build a string from the values in those fields (or in unbound controls if that's what the form uses), just as you did in the code you originally posted.

If I wanted some fancy formatted HTML, I'd write functions that would allow me to input plain text and return formatted text. Only you, of course, know what kind of formatting you have in mind. There are many basic HTML tutorials on the Internet if you don't know anything about HTML formatting.

"Corey H." wrote in message ...
Sue,
This is a "custom phone message form" as in the subject line.
When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.
I'd take screen shots and send them to you so you could see what I'm dealing
with. But, I'm unable to paste into a text field on these responses.
If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?
Corey



"Sue Mosher [MVP-Outlook]" wrote:

I need that attached text box information to be entered into the message box.

If it's a message form, that information is in the Recipients collection. If it's a Post form, which has no Recipients collection, you'd need to use CDO 1.21 or, to avoid security prompts, Redemption to get to the recipients. Each recipient has a name and address.

You never said what kind of form this is, by the way.


"Corey H." wrote in message ...
I'm not exactly sure why we're using html coding for this.
If you use the field chooser to drop the TO: field onto your form, it drops
the box for selecting addresses from your global if you're on exchange. And
drops the information you select from the global into the attached text box.
I need that attached text box information to be entered into the message box.

The other vbscripting for the checkboxes gets the information from an If
then function. If "True", paste into the message area.
Where this would be "take this final value and paste it into the message
area".
I hope that makes sense.


"Sue Mosher [MVP-Outlook]" wrote:

No, that's just the snippet you don't seem to already have. p/p is the HTML element that creates a new paragraph. If you want a proper HTML message, you'd use that tag along with any desired formatting tags to build the final string, using the same technique you already know for getting Outlook property values. To get the right font tags, create text similar to what you want to show in an HTML editor and then take a look at the HTML source.

"Corey H." wrote in message ...
And this is for the text boxes?
In the To: field, the entry changes.
Same for the Company: field, and the Phone: field.
So the user of the form actually types the information into this text box
field.
I just want to take the final value of those fields and enter it into the
message body.

So is the vbscript still strBody = "pTelephoned/p"?

"Sue Mosher [MVP-Outlook]" wrote:

strBody = "pTelephoned/p" etc.


"Corey H." wrote in message ...
And the vbscript for that would look how??
Corey


"Sue Mosher [MVP-Outlook]" wrote:

Then you'd set HTMLBody, not Body and your strBody would need to include all the HTML formatting you want to show.

"Corey H." wrote in message ...
This vbscript is great for returning a set value.
But what if you needed to display font in a text area of the form that
always changes per call, and paste it within the message body.

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



  #14  
Old October 12th 06, 01:00 AM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Phone Message - Custom

strBody1 = strbody1 & Item.UserProperties("Caller") &
Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")


Yes, if Caller, Companytext, and Phonetext are the names of custom fields and you also have a statement to set the message body to the string you're building:

Item.Body = strBody1

After the TO: field, anyone can insert the name from Outlook or Exchange.


Maybe this is a dumb question, but why do you need the recipient information in the body of the message? It's going to be on the message anyway.

If there is a reason, then use the code I provided earlier:

For Each recip in Item.Recipients
strAddr = strAddr & ";" & recip.Address
Next
strAddr = Mid(strAddr, 2)

Or use recip.Name if you want the names. Or both if you want both.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Corey H." wrote in message ...
Yes and here is the stumbling block.
After the TO: field, anyone can insert the name from Outlook or Exchange. I
don't know the coding because the text information entered varies from phone
call to phone call. So how can you enter that into your vbscript?

Wouldn't the coding be:
strBody1 = strbody1 & Item.UserProperties("Caller") &
Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")


Hopefully my explanation here can make my question more understandable.

TO: ________________________________________

COMPANY : __________________________________

PHONE: _____________________________________

MESSAGE____________________________________
X X
X X
X X
X X
X X
X___________________________________________ X

Lets say that the above is the form. Where the underlines are there is a
text box in which you fill in the information. So say I wanted to collect
the information that was entered into the text box next to Phone, and the
text box next to Company. then have it submitted into the text box upon
hitting send, what would the vbscript need to look like? These are bound
text boxes.


"Sue Mosher [MVP-Outlook]" wrote:

When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.

Then you're probably going to need to learn more about basic Outlook programming. It's difficult for us to know what you don't know or what you need to know until you ask a specific question.

This is a "custom phone message form" as in the subject line.

As I said, in a message form, the details about the recipients in the "To" box are in the Item.Recipients collection. The Item.To property will give you only a display name or address -- whatever you see in the UI. What information do you want to extract and put in the message body? For example, this code snippet builds a string of the addresses for all recipients:

For Each recip in Item.Recipients
strAddr = strAddr & ";" & recip.Address
Next
strAddr = Mid(strAddr, 2)

If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?

I would examine the controls to see what field each one is bound to and then write code to build a string from the values in those fields (or in unbound controls if that's what the form uses), just as you did in the code you originally posted.

If I wanted some fancy formatted HTML, I'd write functions that would allow me to input plain text and return formatted text. Only you, of course, know what kind of formatting you have in mind. There are many basic HTML tutorials on the Internet if you don't know anything about HTML formatting.

"Corey H." wrote in message ...
Sue,
This is a "custom phone message form" as in the subject line.
When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.
I'd take screen shots and send them to you so you could see what I'm dealing
with. But, I'm unable to paste into a text field on these responses.
If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?
Corey



"Sue Mosher [MVP-Outlook]" wrote:

I need that attached text box information to be entered into the message box.

If it's a message form, that information is in the Recipients collection. If it's a Post form, which has no Recipients collection, you'd need to use CDO 1.21 or, to avoid security prompts, Redemption to get to the recipients. Each recipient has a name and address.

You never said what kind of form this is, by the way.


"Corey H." wrote in message ...
I'm not exactly sure why we're using html coding for this.
If you use the field chooser to drop the TO: field onto your form, it drops
the box for selecting addresses from your global if you're on exchange. And
drops the information you select from the global into the attached text box.
I need that attached text box information to be entered into the message box.

The other vbscripting for the checkboxes gets the information from an If
then function. If "True", paste into the message area.
Where this would be "take this final value and paste it into the message
area".
I hope that makes sense.


"Sue Mosher [MVP-Outlook]" wrote:

No, that's just the snippet you don't seem to already have. p/p is the HTML element that creates a new paragraph. If you want a proper HTML message, you'd use that tag along with any desired formatting tags to build the final string, using the same technique you already know for getting Outlook property values. To get the right font tags, create text similar to what you want to show in an HTML editor and then take a look at the HTML source.

"Corey H." wrote in message ...
And this is for the text boxes?
In the To: field, the entry changes.
Same for the Company: field, and the Phone: field.
So the user of the form actually types the information into this text box
field.
I just want to take the final value of those fields and enter it into the
message body.

So is the vbscript still strBody = "pTelephoned/p"?

"Sue Mosher [MVP-Outlook]" wrote:

strBody = "pTelephoned/p" etc.


"Corey H." wrote in message ...
And the vbscript for that would look how??
Corey


"Sue Mosher [MVP-Outlook]" wrote:

Then you'd set HTMLBody, not Body and your strBody would need to include all the HTML formatting you want to show.

"Corey H." wrote in message ...
This vbscript is great for returning a set value.
But what if you needed to display font in a text area of the form that
always changes per call, and paste it within the message body.

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



  #15  
Old October 12th 06, 04:13 PM posted to microsoft.public.outlook.program_forms
Corey H.
external usenet poster
 
Posts: 18
Default Phone Message - Custom

Well, the TO: field was just an example.
I'm just going to be using the Caller, Companytext and Phonetext. This is
in order for the Blackberries to see it. The only thing the BB see's on any
phone message form is the message box field.
Corey


"Sue Mosher [MVP-Outlook]" wrote:

strBody1 = strbody1 & Item.UserProperties("Caller") &
Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")


Yes, if Caller, Companytext, and Phonetext are the names of custom fields and you also have a statement to set the message body to the string you're building:

Item.Body = strBody1

After the TO: field, anyone can insert the name from Outlook or Exchange.


Maybe this is a dumb question, but why do you need the recipient information in the body of the message? It's going to be on the message anyway.

If there is a reason, then use the code I provided earlier:

For Each recip in Item.Recipients
strAddr = strAddr & ";" & recip.Address
Next
strAddr = Mid(strAddr, 2)

Or use recip.Name if you want the names. Or both if you want both.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Corey H." wrote in message ...
Yes and here is the stumbling block.
After the TO: field, anyone can insert the name from Outlook or Exchange. I
don't know the coding because the text information entered varies from phone
call to phone call. So how can you enter that into your vbscript?

Wouldn't the coding be:
strBody1 = strbody1 & Item.UserProperties("Caller") &
Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")


Hopefully my explanation here can make my question more understandable.

TO: ________________________________________

COMPANY : __________________________________

PHONE: _____________________________________

MESSAGE____________________________________
X X
X X
X X
X X
X X
X___________________________________________ X

Lets say that the above is the form. Where the underlines are there is a
text box in which you fill in the information. So say I wanted to collect
the information that was entered into the text box next to Phone, and the
text box next to Company. then have it submitted into the text box upon
hitting send, what would the vbscript need to look like? These are bound
text boxes.

"Sue Mosher [MVP-Outlook]" wrote:

When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.

Then you're probably going to need to learn more about basic Outlook programming. It's difficult for us to know what you don't know or what you need to know until you ask a specific question.

This is a "custom phone message form" as in the subject line.

As I said, in a message form, the details about the recipients in the "To" box are in the Item.Recipients collection. The Item.To property will give you only a display name or address -- whatever you see in the UI. What information do you want to extract and put in the message body? For example, this code snippet builds a string of the addresses for all recipients:

For Each recip in Item.Recipients
strAddr = strAddr & ";" & recip.Address
Next
strAddr = Mid(strAddr, 2)

If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?

I would examine the controls to see what field each one is bound to and then write code to build a string from the values in those fields (or in unbound controls if that's what the form uses), just as you did in the code you originally posted.

If I wanted some fancy formatted HTML, I'd write functions that would allow me to input plain text and return formatted text. Only you, of course, know what kind of formatting you have in mind. There are many basic HTML tutorials on the Internet if you don't know anything about HTML formatting.

"Corey H." wrote in message ...
Sue,
This is a "custom phone message form" as in the subject line.
When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.
I'd take screen shots and send them to you so you could see what I'm dealing
with. But, I'm unable to paste into a text field on these responses.
If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?
Corey



"Sue Mosher [MVP-Outlook]" wrote:

I need that attached text box information to be entered into the message box.

If it's a message form, that information is in the Recipients collection. If it's a Post form, which has no Recipients collection, you'd need to use CDO 1.21 or, to avoid security prompts, Redemption to get to the recipients. Each recipient has a name and address.

You never said what kind of form this is, by the way.


"Corey H." wrote in message ...
I'm not exactly sure why we're using html coding for this.
If you use the field chooser to drop the TO: field onto your form, it drops
the box for selecting addresses from your global if you're on exchange. And
drops the information you select from the global into the attached text box.
I need that attached text box information to be entered into the message box.

The other vbscripting for the checkboxes gets the information from an If
then function. If "True", paste into the message area.
Where this would be "take this final value and paste it into the message
area".
I hope that makes sense.


"Sue Mosher [MVP-Outlook]" wrote:

No, that's just the snippet you don't seem to already have. p/p is the HTML element that creates a new paragraph. If you want a proper HTML message, you'd use that tag along with any desired formatting tags to build the final string, using the same technique you already know for getting Outlook property values. To get the right font tags, create text similar to what you want to show in an HTML editor and then take a look at the HTML source.

"Corey H." wrote in message ...
And this is for the text boxes?
In the To: field, the entry changes.
Same for the Company: field, and the Phone: field.
So the user of the form actually types the information into this text box
field.
I just want to take the final value of those fields and enter it into the
message body.

So is the vbscript still strBody = "pTelephoned/p"?

"Sue Mosher [MVP-Outlook]" wrote:

strBody = "pTelephoned/p" etc.


"Corey H." wrote in message ...
And the vbscript for that would look how??
Corey


"Sue Mosher [MVP-Outlook]" wrote:

Then you'd set HTMLBody, not Body and your strBody would need to include all the HTML formatting you want to show.

"Corey H." wrote in message ...
This vbscript is great for returning a set value.
But what if you needed to display font in a text area of the form that
always changes per call, and paste it within the message body.

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




  #16  
Old October 12th 06, 04:46 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Phone Message - Custom

You already know how to access the data from custom properties, given that you had in your original code statements like:

If Item.UserProperties("Rush") = True Then

and

strBody1 = strbody1 & Item.UserProperties("Caller") & Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")

More questions?
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Corey H." wrote in message ...
Well, the TO: field was just an example.
I'm just going to be using the Caller, Companytext and Phonetext. This is
in order for the Blackberries to see it. The only thing the BB see's on any
phone message form is the message box field.
Corey


"Sue Mosher [MVP-Outlook]" wrote:

strBody1 = strbody1 & Item.UserProperties("Caller") &
Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")


Yes, if Caller, Companytext, and Phonetext are the names of custom fields and you also have a statement to set the message body to the string you're building:

Item.Body = strBody1

After the TO: field, anyone can insert the name from Outlook or Exchange.


Maybe this is a dumb question, but why do you need the recipient information in the body of the message? It's going to be on the message anyway.

If there is a reason, then use the code I provided earlier:

For Each recip in Item.Recipients
strAddr = strAddr & ";" & recip.Address
Next
strAddr = Mid(strAddr, 2)

Or use recip.Name if you want the names. Or both if you want both.



"Corey H." wrote in message ...
Yes and here is the stumbling block.
After the TO: field, anyone can insert the name from Outlook or Exchange. I
don't know the coding because the text information entered varies from phone
call to phone call. So how can you enter that into your vbscript?

Wouldn't the coding be:
strBody1 = strbody1 & Item.UserProperties("Caller") &
Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")


Hopefully my explanation here can make my question more understandable.

TO: ________________________________________

COMPANY : __________________________________

PHONE: _____________________________________

MESSAGE____________________________________
X X
X X
X X
X X
X X
X___________________________________________ X

Lets say that the above is the form. Where the underlines are there is a
text box in which you fill in the information. So say I wanted to collect
the information that was entered into the text box next to Phone, and the
text box next to Company. then have it submitted into the text box upon
hitting send, what would the vbscript need to look like? These are bound
text boxes.

"Sue Mosher [MVP-Outlook]" wrote:

When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.

Then you're probably going to need to learn more about basic Outlook programming. It's difficult for us to know what you don't know or what you need to know until you ask a specific question.

This is a "custom phone message form" as in the subject line.

As I said, in a message form, the details about the recipients in the "To" box are in the Item.Recipients collection. The Item.To property will give you only a display name or address -- whatever you see in the UI. What information do you want to extract and put in the message body? For example, this code snippet builds a string of the addresses for all recipients:

For Each recip in Item.Recipients
strAddr = strAddr & ";" & recip.Address
Next
strAddr = Mid(strAddr, 2)

If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?

I would examine the controls to see what field each one is bound to and then write code to build a string from the values in those fields (or in unbound controls if that's what the form uses), just as you did in the code you originally posted.

If I wanted some fancy formatted HTML, I'd write functions that would allow me to input plain text and return formatted text. Only you, of course, know what kind of formatting you have in mind. There are many basic HTML tutorials on the Internet if you don't know anything about HTML formatting.

"Corey H." wrote in message ...
Sue,
This is a "custom phone message form" as in the subject line.
When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.
I'd take screen shots and send them to you so you could see what I'm dealing
with. But, I'm unable to paste into a text field on these responses.
If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?
Corey



"Sue Mosher [MVP-Outlook]" wrote:

I need that attached text box information to be entered into the message box.

If it's a message form, that information is in the Recipients collection. If it's a Post form, which has no Recipients collection, you'd need to use CDO 1.21 or, to avoid security prompts, Redemption to get to the recipients. Each recipient has a name and address.

You never said what kind of form this is, by the way.


"Corey H." wrote in message ...
I'm not exactly sure why we're using html coding for this.
If you use the field chooser to drop the TO: field onto your form, it drops
the box for selecting addresses from your global if you're on exchange. And
drops the information you select from the global into the attached text box.
I need that attached text box information to be entered into the message box.

The other vbscripting for the checkboxes gets the information from an If
then function. If "True", paste into the message area.
Where this would be "take this final value and paste it into the message
area".
I hope that makes sense.


"Sue Mosher [MVP-Outlook]" wrote:

No, that's just the snippet you don't seem to already have. p/p is the HTML element that creates a new paragraph. If you want a proper HTML message, you'd use that tag along with any desired formatting tags to build the final string, using the same technique you already know for getting Outlook property values. To get the right font tags, create text similar to what you want to show in an HTML editor and then take a look at the HTML source.

"Corey H." wrote in message ...
And this is for the text boxes?
In the To: field, the entry changes.
Same for the Company: field, and the Phone: field.
So the user of the form actually types the information into this text box
field.
I just want to take the final value of those fields and enter it into the
message body.

So is the vbscript still strBody = "pTelephoned/p"?

"Sue Mosher [MVP-Outlook]" wrote:

strBody = "pTelephoned/p" etc.


"Corey H." wrote in message ...
And the vbscript for that would look how??
Corey


"Sue Mosher [MVP-Outlook]" wrote:

Then you'd set HTMLBody, not Body and your strBody would need to include all the HTML formatting you want to show.

"Corey H." wrote in message ...
This vbscript is great for returning a set value.
But what if you needed to display font in a text area of the form that
always changes per call, and paste it within the message body.

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




  #17  
Old October 12th 06, 05:54 PM posted to microsoft.public.outlook.program_forms
Corey H.
external usenet poster
 
Posts: 18
Default Phone Message - Custom

Being that the object variable is not set, does that mean that I have to set
each area because there is nothing inserted into the text box (i.e. "Caller",
"Phonetext") as a null value.

So I'm thinking it'd be
Set item.userproperties("Caller") = null
Set item.userproperties("Caller") = null
Set item.userproperties("Caller") = null
strBody1 = strbody1 & Item.UserProperties("Caller") &
Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")
Item.Body=strBody1


"Sue Mosher [MVP-Outlook]" wrote:

You already know how to access the data from custom properties, given that you had in your original code statements like:

If Item.UserProperties("Rush") = True Then

and

strBody1 = strbody1 & Item.UserProperties("Caller") & Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")

More questions?
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Corey H." wrote in message ...
Well, the TO: field was just an example.
I'm just going to be using the Caller, Companytext and Phonetext. This is
in order for the Blackberries to see it. The only thing the BB see's on any
phone message form is the message box field.
Corey


"Sue Mosher [MVP-Outlook]" wrote:

strBody1 = strbody1 & Item.UserProperties("Caller") &
Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")

Yes, if Caller, Companytext, and Phonetext are the names of custom fields and you also have a statement to set the message body to the string you're building:

Item.Body = strBody1

After the TO: field, anyone can insert the name from Outlook or Exchange.

Maybe this is a dumb question, but why do you need the recipient information in the body of the message? It's going to be on the message anyway.

If there is a reason, then use the code I provided earlier:

For Each recip in Item.Recipients
strAddr = strAddr & ";" & recip.Address
Next
strAddr = Mid(strAddr, 2)

Or use recip.Name if you want the names. Or both if you want both.



"Corey H." wrote in message ...
Yes and here is the stumbling block.
After the TO: field, anyone can insert the name from Outlook or Exchange. I
don't know the coding because the text information entered varies from phone
call to phone call. So how can you enter that into your vbscript?

Wouldn't the coding be:
strBody1 = strbody1 & Item.UserProperties("Caller") &
Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")


Hopefully my explanation here can make my question more understandable.

TO: ________________________________________

COMPANY : __________________________________

PHONE: _____________________________________

MESSAGE____________________________________
X X
X X
X X
X X
X X
X___________________________________________ X

Lets say that the above is the form. Where the underlines are there is a
text box in which you fill in the information. So say I wanted to collect
the information that was entered into the text box next to Phone, and the
text box next to Company. then have it submitted into the text box upon
hitting send, what would the vbscript need to look like? These are bound
text boxes.

"Sue Mosher [MVP-Outlook]" wrote:

When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.

Then you're probably going to need to learn more about basic Outlook programming. It's difficult for us to know what you don't know or what you need to know until you ask a specific question.

This is a "custom phone message form" as in the subject line.

As I said, in a message form, the details about the recipients in the "To" box are in the Item.Recipients collection. The Item.To property will give you only a display name or address -- whatever you see in the UI. What information do you want to extract and put in the message body? For example, this code snippet builds a string of the addresses for all recipients:

For Each recip in Item.Recipients
strAddr = strAddr & ";" & recip.Address
Next
strAddr = Mid(strAddr, 2)

If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?

I would examine the controls to see what field each one is bound to and then write code to build a string from the values in those fields (or in unbound controls if that's what the form uses), just as you did in the code you originally posted.

If I wanted some fancy formatted HTML, I'd write functions that would allow me to input plain text and return formatted text. Only you, of course, know what kind of formatting you have in mind. There are many basic HTML tutorials on the Internet if you don't know anything about HTML formatting.

"Corey H." wrote in message ...
Sue,
This is a "custom phone message form" as in the subject line.
When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.
I'd take screen shots and send them to you so you could see what I'm dealing
with. But, I'm unable to paste into a text field on these responses.
If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?
Corey



"Sue Mosher [MVP-Outlook]" wrote:

I need that attached text box information to be entered into the message box.

If it's a message form, that information is in the Recipients collection. If it's a Post form, which has no Recipients collection, you'd need to use CDO 1.21 or, to avoid security prompts, Redemption to get to the recipients. Each recipient has a name and address.

You never said what kind of form this is, by the way.


"Corey H." wrote in message ...
I'm not exactly sure why we're using html coding for this.
If you use the field chooser to drop the TO: field onto your form, it drops
the box for selecting addresses from your global if you're on exchange. And
drops the information you select from the global into the attached text box.
I need that attached text box information to be entered into the message box.

The other vbscripting for the checkboxes gets the information from an If
then function. If "True", paste into the message area.
Where this would be "take this final value and paste it into the message
area".
I hope that makes sense.


"Sue Mosher [MVP-Outlook]" wrote:

No, that's just the snippet you don't seem to already have. p/p is the HTML element that creates a new paragraph. If you want a proper HTML message, you'd use that tag along with any desired formatting tags to build the final string, using the same technique you already know for getting Outlook property values. To get the right font tags, create text similar to what you want to show in an HTML editor and then take a look at the HTML source.

"Corey H." wrote in message ...
And this is for the text boxes?
In the To: field, the entry changes.
Same for the Company: field, and the Phone: field.
So the user of the form actually types the information into this text box
field.
I just want to take the final value of those fields and enter it into the
message body.

So is the vbscript still strBody = "pTelephoned/p"?

"Sue Mosher [MVP-Outlook]" wrote:

strBody = "pTelephoned/p" etc.


"Corey H." wrote in message ...
And the vbscript for that would look how??
Corey


"Sue Mosher [MVP-Outlook]" wrote:

Then you'd set HTMLBody, not Body and your strBody would need to include all the HTML formatting you want to show.

"Corey H." wrote in message ...
This vbscript is great for returning a set value.
But what if you needed to display font in a text area of the form that
always changes per call, and paste it within the message body.

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





  #18  
Old October 12th 06, 07:15 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Phone Message - Custom

You lost me. How does "object variable is not set" figure into this?

FYI, this is invalid syntax:

Set item.userproperties("Caller") = null

What are you trying to do with that statement?
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Corey H." wrote in message ...
Being that the object variable is not set, does that mean that I have to set
each area because there is nothing inserted into the text box (i.e. "Caller",
"Phonetext") as a null value.

So I'm thinking it'd be
Set item.userproperties("Caller") = null
Set item.userproperties("Caller") = null
Set item.userproperties("Caller") = null
strBody1 = strbody1 & Item.UserProperties("Caller") &
Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")
Item.Body=strBody1


"Corey H." wrote in message ...
Well, the TO: field was just an example.
I'm just going to be using the Caller, Companytext and Phonetext. This is
in order for the Blackberries to see it. The only thing the BB see's on any
phone message form is the message box field.
Corey


"Sue Mosher [MVP-Outlook]" wrote:

strBody1 = strbody1 & Item.UserProperties("Caller") &
Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")

Yes, if Caller, Companytext, and Phonetext are the names of custom fields and you also have a statement to set the message body to the string you're building:

Item.Body = strBody1

After the TO: field, anyone can insert the name from Outlook or Exchange.

Maybe this is a dumb question, but why do you need the recipient information in the body of the message? It's going to be on the message anyway.

If there is a reason, then use the code I provided earlier:

For Each recip in Item.Recipients
strAddr = strAddr & ";" & recip.Address
Next
strAddr = Mid(strAddr, 2)

Or use recip.Name if you want the names. Or both if you want both.



"Corey H." wrote in message ...
Yes and here is the stumbling block.
After the TO: field, anyone can insert the name from Outlook or Exchange. I
don't know the coding because the text information entered varies from phone
call to phone call. So how can you enter that into your vbscript?

Wouldn't the coding be:
strBody1 = strbody1 & Item.UserProperties("Caller") &
Item.UserProperties("Companytext") & Item.UserProperties("Phonetext")


Hopefully my explanation here can make my question more understandable.

TO: ________________________________________

COMPANY : __________________________________

PHONE: _____________________________________

MESSAGE____________________________________
X X
X X
X X
X X
X X
X___________________________________________ X

Lets say that the above is the form. Where the underlines are there is a
text box in which you fill in the information. So say I wanted to collect
the information that was entered into the text box next to Phone, and the
text box next to Company. then have it submitted into the text box upon
hitting send, what would the vbscript need to look like? These are bound
text boxes.

"Sue Mosher [MVP-Outlook]" wrote:

When you start talking about CDO, Recipient collections, post form, etc,
it's all greek to me.

Then you're probably going to need to learn more about basic Outlook programming. It's difficult for us to know what you don't know or what you need to know until you ask a specific question.

This is a "custom phone message form" as in the subject line.

As I said, in a message form, the details about the recipients in the "To" box are in the Item.Recipients collection. The Item.To property will give you only a display name or address -- whatever you see in the UI. What information do you want to extract and put in the message body? For example, this code snippet builds a string of the addresses for all recipients:

For Each recip in Item.Recipients
strAddr = strAddr & ";" & recip.Address
Next
strAddr = Mid(strAddr, 2)

If you go to the default "while you were out" form from Microsoft, and you
want to take the information from the fillable text fields and enter them
into the message body, how would you do it?

I would examine the controls to see what field each one is bound to and then write code to build a string from the values in those fields (or in unbound controls if that's what the form uses), just as you did in the code you originally posted.

If I wanted some fancy formatted HTML, I'd write functions that would allow me to input plain text and return formatted text. Only you, of course, know what kind of formatting you have in mind. There are many basic HTML tutorials on the Internet if you don't know anything about HTML formatting.

"Corey H." wro