Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
What if the data line looks like:
200|823757|MATTHEW H|BUTLER|9852 DUBLIN DRIVE||MANASSAS |VA|20109|99 it is not reading the Null field (||). How can I get it to create the null field? Thank you... nlines = ALINES(laData, STRTRAN(cStrng, "|", CHR(13))) DO CASE CASE laData(1) = "200" m.MemNum = laData(2) m.FName = laData(3) m.LName = laData(4) m.MailAddr1 = laData(5) m.MailAddr2 = "" m.MailCity = laData(6) m.MailState = laData(7) m.MailZip = laData(8) m.MailCode = laData(9) |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
I do not know what programming language you are using, but in VBA, if you
use Dim LaData As Variant LaData = Split("200|823757|MATTHEW H|BUTLER|9852 DUBLIN DRIVE||MANASSAS |VA|20109|99", "|") For i = 0 To UBound(LaData) MsgBox LaData(i) Next i the null value is returned. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "Dorian C. Chalom" wrote in message ... What if the data line looks like: 200|823757|MATTHEW H|BUTLER|9852 DUBLIN DRIVE||MANASSAS |VA|20109|99 it is not reading the Null field (||). How can I get it to create the null field? Thank you... nlines = ALINES(laData, STRTRAN(cStrng, "|", CHR(13))) DO CASE CASE laData(1) = "200" m.MemNum = laData(2) m.FName = laData(3) m.LName = laData(4) m.MailAddr1 = laData(5) m.MailAddr2 = "" m.MailCity = laData(6) m.MailState = laData(7) m.MailZip = laData(8) m.MailCode = laData(9) |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
FoxPro? Which version?
Is it possible to specify the end-of-line character explicitly in an additional parameter, and if so, does that make a difference? Peter Jamieson http://tips.pjmsn.me.uk On 01/05/2010 21:48, Dorian C. Chalom wrote: What if the data line looks like: 200|823757|MATTHEW H|BUTLER|9852 DUBLIN DRIVE||MANASSAS |VA|20109|99 it is not reading the Null field (||). How can I get it to create the null field? Thank you... nlines = ALINES(laData, STRTRAN(cStrng, "|", CHR(13))) DO CASE CASE laData(1) = "200" m.MemNum = laData(2) m.FName = laData(3) m.LName = laData(4) m.MailAddr1 = laData(5) m.MailAddr2 = "" m.MailCity = laData(6) m.MailState = laData(7) m.MailZip = laData(8) m.MailCode = laData(9) |
#4
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
VFP 6.0 and I do not know what the End of Line character is I am working on
determining that. But I did discover if I do nlines = ALINES(laData, STRTRAN(cStrng, "|", CHR(10)+CHR(13))) instead of nlines = ALINES(laData, STRTRAN(cStrng, "|", CHR(13))) it does take care of the "||" issue. Howeve now I am running into a "|" {end of line} issue...and it goes on. Thank you. "Peter Jamieson" wrote in message ... FoxPro? Which version? Is it possible to specify the end-of-line character explicitly in an additional parameter, and if so, does that make a difference? Peter Jamieson http://tips.pjmsn.me.uk On 01/05/2010 21:48, Dorian C. Chalom wrote: What if the data line looks like: 200|823757|MATTHEW H|BUTLER|9852 DUBLIN DRIVE||MANASSAS |VA|20109|99 it is not reading the Null field (||). How can I get it to create the null field? Thank you... nlines = ALINES(laData, STRTRAN(cStrng, "|", CHR(13))) DO CASE CASE laData(1) = "200" m.MemNum = laData(2) m.FName = laData(3) m.LName = laData(4) m.MailAddr1 = laData(5) m.MailAddr2 = "" m.MailCity = laData(6) m.MailState = laData(7) m.MailZip = laData(8) m.MailCode = laData(9) |
#5
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
You would be far better off finding a VFP group for help on how to do
this split. (FWIW, it would take me time to set up a VFP system again, and I'm not familiar enough with the language to suggest an approach that is liekly to work well). Also, although it may be unlikely that the | character appears in the data itself, in theory you need to consider the case where it does - typically, routines that split strings are too simplistic to do that properly. Peter Jamieson http://tips.pjmsn.me.uk On 02/05/2010 02:14, Dorian C. Chalom wrote: VFP 6.0 and I do not know what the End of Line character is I am working on determining that. But I did discover if I do nlines = ALINES(laData, STRTRAN(cStrng, "|", CHR(10)+CHR(13))) instead of nlines = ALINES(laData, STRTRAN(cStrng, "|", CHR(13))) it does take care of the "||" issue. Howeve now I am running into a "|" {end of line} issue...and it goes on. Thank you. "Peter wrote in message ... FoxPro? Which version? Is it possible to specify the end-of-line character explicitly in an additional parameter, and if so, does that make a difference? Peter Jamieson http://tips.pjmsn.me.uk On 01/05/2010 21:48, Dorian C. Chalom wrote: What if the data line looks like: 200|823757|MATTHEW H|BUTLER|9852 DUBLIN DRIVE||MANASSAS |VA|20109|99 it is not reading the Null field (||). How can I get it to create the null field? Thank you... nlines = ALINES(laData, STRTRAN(cStrng, "|", CHR(13))) DO CASE CASE laData(1) = "200" m.MemNum = laData(2) m.FName = laData(3) m.LName = laData(4) m.MailAddr1 = laData(5) m.MailAddr2 = "" m.MailCity = laData(6) m.MailState = laData(7) m.MailZip = laData(8) m.MailCode = laData(9) |