Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Regular expressions in VFP
Message
De
09/10/2008 14:37:25
 
 
À
09/10/2008 14:10:36
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01353849
Message ID:
01353896
Vues:
27
oDoc = oWord.oDocuments.Open(....)
cContent = oDoc.Content()

gives me the text

there could be some stuff prior to the date and address
but somewhere there is a date and then the name/address like:

....
October 9,2008

Mr Tore Bleken
123 Fjord Bld.
Stokke, CT 06279



dear....


......
.....
.....

and so on

cContent gets placed into a memo field
once I get the name I can redo it into lastname, fisrtname

locate it in the contacts table, get the id and update the cletters table with the contact_id

and so on

the tricj is finding the name/address in the content
if i COULD at least find the date with a regex I could do the rest fairly easyly
Peter

>If I understand correctly, you have these lines after each other in the letter:
>Date
>Name
>Address1
>Address2
>Address3
>
>If the date format is fixed, you can convert the letters, one by one, to a text file. Create a cursor with structure c(255), and append from the text file. Scan the cursor, and find the record which contains a legal date. The next record is the name you are looking for.
>
>
>>July 12, 2007
>>
>>if i can find this I would be all set, because the name and address comes after it
>>
>>Peter
>>
>>>Hi,
>>>
>>>Not neccessarily impossible - though likely not to be easy.
>>>
Peter Cortiel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform