![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
In my custom form code, I have global variable: Dim varDocumentation Further down in my code, I add things to the variable like this: if Item.UserProperties("AirWater") = True then varDocumentation = varDocumentation & "Air, Water, and Stuctural Reports" & vbCrLf end if if Item.UserProperties("Impact") = True then varDocumentation = varDocumentation & "Impact Safety Test Report" & vbCrLf end if If enough of the my if statements are true, I will get an error saying "String too long". Any ideas on how to fix this? Thanks, Joel |
Ads |
#2
|
|||
|
|||
![]()
What value does Len(varDocumentation) give you at that point? What's the purpose of that variable?
FYI, the newsgroup for custom form issues is microsoft.public.outlook.program_forms. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Joel Allen" wrote in message ... Hi, In my custom form code, I have global variable: Dim varDocumentation Further down in my code, I add things to the variable like this: if Item.UserProperties("AirWater") = True then varDocumentation = varDocumentation & "Air, Water, and Stuctural Reports" & vbCrLf end if if Item.UserProperties("Impact") = True then varDocumentation = varDocumentation & "Impact Safety Test Report" & vbCrLf end if If enough of the my if statements are true, I will get an error saying "String too long". Any ideas on how to fix this? Thanks, Joel |
#3
|
|||
|
|||
![]()
Sorry Sue. I figured it out.
"Sue Mosher [MVP-Outlook]" wrote in message ... What value does Len(varDocumentation) give you at that point? What's the purpose of that variable? FYI, the newsgroup for custom form issues is microsoft.public.outlook.program_forms. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Joel Allen" wrote in message ... Hi, In my custom form code, I have global variable: Dim varDocumentation Further down in my code, I add things to the variable like this: if Item.UserProperties("AirWater") = True then varDocumentation = varDocumentation & "Air, Water, and Stuctural Reports" & vbCrLf end if if Item.UserProperties("Impact") = True then varDocumentation = varDocumentation & "Impact Safety Test Report" & vbCrLf end if If enough of the my if statements are true, I will get an error saying "String too long". Any ideas on how to fix this? Thanks, Joel |
#4
|
|||
|
|||
![]()
You might want to post your solution, to benefit people who read this thread later and have a similar problem.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Joel Allen" wrote in message ... Sorry Sue. I figured it out. "Sue Mosher [MVP-Outlook]" wrote in message ... What value does Len(varDocumentation) give you at that point? What's the purpose of that variable? "Joel Allen" wrote in message ... Hi, In my custom form code, I have global variable: Dim varDocumentation Further down in my code, I add things to the variable like this: if Item.UserProperties("AirWater") = True then varDocumentation = varDocumentation & "Air, Water, and Stuctural Reports" & vbCrLf end if if Item.UserProperties("Impact") = True then varDocumentation = varDocumentation & "Impact Safety Test Report" & vbCrLf end if If enough of the my if statements are true, I will get an error saying "String too long". Any ideas on how to fix this? Thanks, Joel |
#5
|
|||
|
|||
![]()
Of course. It's not really a solution, but found a valid work around.
Within a custom form, I had a subroutine that opened a Word document and populated a Form Field with a large amount of date. It would give me a string too long error. At first I thought it was the variable within my custom form. But no, it was the Form field which can only handle so many characters. I ended up just making two form fields within Word, and strung them together. Joel "Sue Mosher [MVP-Outlook]" wrote in message ... You might want to post your solution, to benefit people who read this thread later and have a similar problem. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Joel Allen" wrote in message ... Sorry Sue. I figured it out. "Sue Mosher [MVP-Outlook]" wrote in message ... What value does Len(varDocumentation) give you at that point? What's the purpose of that variable? "Joel Allen" wrote in message ... Hi, In my custom form code, I have global variable: Dim varDocumentation Further down in my code, I add things to the variable like this: if Item.UserProperties("AirWater") = True then varDocumentation = varDocumentation & "Air, Water, and Stuctural Reports" & vbCrLf end if if Item.UserProperties("Impact") = True then varDocumentation = varDocumentation & "Impact Safety Test Report" & vbCrLf end if If enough of the my if statements are true, I will get an error saying "String too long". Any ideas on how to fix this? Thanks, Joel |
#6
|
|||
|
|||
![]()
Better yet, don't use a FormField at all. Instead, use a Bookmark and the InsertAfter method to insert your text at that mark.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Joel Allen" wrote in message ... Of course. It's not really a solution, but found a valid work around. Within a custom form, I had a subroutine that opened a Word document and populated a Form Field with a large amount of date. It would give me a string too long error. At first I thought it was the variable within my custom form. But no, it was the Form field which can only handle so many characters. I ended up just making two form fields within Word, and strung them together. Joel "Sue Mosher [MVP-Outlook]" wrote in message ... You might want to post your solution, to benefit people who read this thread later and have a similar problem. "Joel Allen" wrote in message ... Sorry Sue. I figured it out. "Sue Mosher [MVP-Outlook]" wrote in message ... What value does Len(varDocumentation) give you at that point? What's the purpose of that variable? "Joel Allen" wrote in message ... Hi, In my custom form code, I have global variable: Dim varDocumentation Further down in my code, I add things to the variable like this: if Item.UserProperties("AirWater") = True then varDocumentation = varDocumentation & "Air, Water, and Stuctural Reports" & vbCrLf end if if Item.UserProperties("Impact") = True then varDocumentation = varDocumentation & "Impact Safety Test Report" & vbCrLf end if If enough of the my if statements are true, I will get an error saying "String too long". Any ideas on how to fix this? Thanks, Joel |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Changing value of mstVACFolder variable | william richardson | Outlook and VBA | 0 | September 17th 07 10:55 PM |
How to assign database value to a variable | Eric J | Outlook - Using Forms | 12 | May 4th 07 02:02 AM |
Variable Date Meetings | Susan Vega | Outlook - Calandaring | 1 | March 22nd 06 05:58 PM |
Variable attachment and recipient vb | Xluser@work | Outlook and VBA | 1 | January 21st 06 10:05 AM |
string variable that contains formatting | Martin | Outlook and VBA | 4 | January 19th 06 10:49 AM |