|
-
Apr 23rd, 2009, 04:49 PM
#1
Thread Starter
Addicted Member
String size problem.
Hello again 4 you all...
In my application i have a TextBox named "Me.txt_catre.Text" and a MS Word File (.doc) containig "<<03>>" word that must be replaced with the value from TextBox...
I use this peice of code...
Code:
With myStoryRange.Find
.Text = "<<03>>"
.Replacement.Text = Me.txt_catre.Text
.Wrap = Microsoft.Office.Interop.Word.WdFindWrap.wdFindContinue
.Execute(Replace:=Microsoft.Office.Interop.Word.WdReplace.wdReplaceAll)
End With
The problem is... if the "Me.txt_catre.Text" contains more than 255 characters as a string... the application gives me error...
What solution i have to place more than 255 chars into that MS Word file ?
Thanks in advice!
I'm still learning VB.NET
Sorry for my bad english
Thanks for your help
-
Apr 23rd, 2009, 04:53 PM
#2
Re: String size problem.
its likely a limitation specificly with the find/replace methods of the word object model. I would imagine if you were to do something like, remove the <<03>> and then insert the text you want in its place (versus trying to do a find/replace) then it would probably work fine.
-
Apr 23rd, 2009, 06:41 PM
#3
Thread Starter
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|