Erro tranferindo dados p/ FormFields no Word

Delphi

12/11/2004

Estou mandando informacoes via OLE do Delphi p/ o Word.

Document.FormFields.Item(´Especif_ProdServ´).Result := Memo1.Text;


O erro ocorre quando o Memo tem mais de 255 chars.

ERRO -> Seqüência de caracteres muito longa

Achei algo num site de VB sobre isso, soh que ateh agora ninguem de VB/Delphi conseguiu resolver o problema. :(

If you use: Dim FmFld As FormField, Str1 As String Str1 = (a long string > 256 characters) Set FmFld = ActiveDocument.FormFields(1) FmFld.Result = Str1 You get an error: “String too long” (a ridiculous “design” feature, given that you can do it manually without problems!). Same if you use: ActiveDocument.Formfields(´Text1´).Result = Str1 You can get round this by using: ActiveDocument.Unprotect FmFld.Range.Fields(1).Result.Text = Str1 ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True Or if you´re referring to the formfield by name: ActiveDocument.Unprotect ActiveDocument.Bookmarks(´Text1´).Range.Fields(1).Result.Text = Str1 ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True


Se alguem souber algo a respeito ou algo que pelo menos encaminhe, eu agradeco. Jah tentei de todas as formas possiveis aqui e nao due resultado...


Shdw

Shdw

Curtidas 0

Respostas

Shdw

Shdw

12/11/2004

Ninguem faz ideia ???? :(


GOSTEI 0
POSTAR