I have an Outlook98 application that uses a custom form (based on a task item).
I have added a print function that opens a Word template and copies all the form's field values to the Word fields.
On the whole it seems to work OK. However, there is one problem I am getting that could be a bit of a drawback. The text fields within the Word template are defined as "Maximum Length = Unlimited". In Outlook, when I assign a text field's value to a variable there is no problem. But when I then try to assign that variable value to the word field I'm getting a "String too long" error if the field contains more than 255 characters.
I am using the following syntax to copy to the word document:
oWordDoc.FormFields("ChangeDetails".Result = ofChangeDetails
The custom fields in Outlook accept more than 255 characters, and the Word fields should accept more than 255 characters, so why will it not copy a large string from one to the other?
How can I do this?
I have added a print function that opens a Word template and copies all the form's field values to the Word fields.
On the whole it seems to work OK. However, there is one problem I am getting that could be a bit of a drawback. The text fields within the Word template are defined as "Maximum Length = Unlimited". In Outlook, when I assign a text field's value to a variable there is no problem. But when I then try to assign that variable value to the word field I'm getting a "String too long" error if the field contains more than 255 characters.
I am using the following syntax to copy to the word document:
oWordDoc.FormFields("ChangeDetails".Result = ofChangeDetails
The custom fields in Outlook accept more than 255 characters, and the Word fields should accept more than 255 characters, so why will it not copy a large string from one to the other?
How can I do this?