problem adding vbCrLf to FormField 
Author Message
 problem adding vbCrLf to FormField

I am trying to add several lines of address information
into one single form field using the vbCrlf (control line
feed) to move to the next line.  For some reason, using
the vbCrlf or even the Chr(13) only appends the symbol to
the string instead of actually putting in the line feed
or the carriage return.  Has anyone ever run into a
problem like this or have any suggestions.  

ActiveDocument.FormFields("Address").Result =
"Name" + vbCrlf + "Address1" + vbcrlf + "Address2" +
vbcrlf + "CityStateZip"

Thanks,
Jean



Wed, 31 Aug 2005 01:02:22 GMT  
 problem adding vbCrLf to FormField
Hi Jeanmac,

Use vbCr instead of vbCrlf

Please respond to the newsgroups for the benefit of others who may be
interested.

Hope this helps
Doug Robbins - Word MVP

Quote:
> I am trying to add several lines of address information
> into one single form field using the vbCrlf (control line
> feed) to move to the next line.  For some reason, using
> the vbCrlf or even the Chr(13) only appends the symbol to
> the string instead of actually putting in the line feed
> or the carriage return.  Has anyone ever run into a
> problem like this or have any suggestions.

> ActiveDocument.FormFields("Address").Result =
> "Name" + vbCrlf + "Address1" + vbcrlf + "Address2" +
> vbcrlf + "CityStateZip"

> Thanks,
> Jean



Wed, 31 Aug 2005 01:26:35 GMT  
 problem adding vbCrLf to FormField
Doug,

I replaced the vbCrlf with vbCr but I'm still having the
same problems.  

Thanks for you help,
Jean

Quote:
>-----Original Message-----
>Hi Jeanmac,

>Use vbCr instead of vbCrlf

>Please respond to the newsgroups for the benefit of
others who may be
>interested.

>Hope this helps
>Doug Robbins - Word MVP


>> I am trying to add several lines of address information
>> into one single form field using the vbCrlf (control
line
>> feed) to move to the next line.  For some reason, using
>> the vbCrlf or even the Chr(13) only appends the symbol
to
>> the string instead of actually putting in the line feed
>> or the carriage return.  Has anyone ever run into a
>> problem like this or have any suggestions.

>> ActiveDocument.FormFields("Address").Result =
>> "Name" + vbCrlf + "Address1" + vbcrlf + "Address2" +
>> vbcrlf + "CityStateZip"

>> Thanks,
>> Jean

>.



Fri, 02 Sep 2005 22:24:11 GMT  
 problem adding vbCrLf to FormField
Hi Jean,

I missed in your original post that you had + instead of & in the code.

When I run

ActiveDocument.FormFields("Text1").Result = "Name" & vbCr & "Address1" &
vbCr & "Address2" & vbCr & "CityStateZip"

This is the result in the Text1 formfield

Name
Address1
Address2
CityStateZip

without any symbols.

Please respond to the newsgroups for the benefit of others who may be
interested.

Hope this helps
Doug Robbins - Word MVP

Quote:
> Doug,

> I replaced the vbCrlf with vbCr but I'm still having the
> same problems.

> Thanks for you help,
> Jean

> >-----Original Message-----
> >Hi Jeanmac,

> >Use vbCr instead of vbCrlf

> >Please respond to the newsgroups for the benefit of
> others who may be
> >interested.

> >Hope this helps
> >Doug Robbins - Word MVP


> >> I am trying to add several lines of address information
> >> into one single form field using the vbCrlf (control
> line
> >> feed) to move to the next line.  For some reason, using
> >> the vbCrlf or even the Chr(13) only appends the symbol
> to
> >> the string instead of actually putting in the line feed
> >> or the carriage return.  Has anyone ever run into a
> >> problem like this or have any suggestions.

> >> ActiveDocument.FormFields("Address").Result =
> >> "Name" + vbCrlf + "Address1" + vbcrlf + "Address2" +
> >> vbcrlf + "CityStateZip"

> >> Thanks,
> >> Jean

> >.



Sat, 03 Sep 2005 06:31:35 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. vbcrlf or vbCrLf

2. FormFields - go to next formfield - fire on-exit macro

3. Adding formfields into Word tables

4. How to Add FormFields?

5. Adding named formfield text boxes programatically

6. Adding formfields into Word tables

7. VB 6 problem using "vbCrLf"

8. FormField Problem

9. Problems selecting formfields

10. Problems with protection and formfields

11. vbCrLf after attachment - (not '.Body')

12. vbCrLf - what is it?

 

 
Powered by phpBB® Forum Software