|
FORUMS PROFESSIONNELS WINDEV, WEBDEV et WINDEV Mobile |
| | | | | |
Champs Traitement de texte |
Débuté par Jean-Michel, 02 nov. 2018 07:02 - 8 réponses |
| |
| | | |
|
| |
Membre enregistré 834 messages Popularité : +13 (13 votes) |
|
Posté le 02 novembre 2018 - 07:02 |
Bonjour,
J'apprends à me saisir de ce champs en 23. J'ai du mal.............
J’ai mon fichier .Docx :
Je saisie à la main 2 produits avec prix :
Je veux créer mon fichier Word en affectant les datas aux variables :
TT_Proposition est un Document TT_Proposition = DocOuvre(fRepExe + "\propal.docx")
PTableau est un docParagraphe PTableau <= TT_Proposition..Paragraphe[1]
HLitRecherche(Clients,IDClients,COMBO_Clients..ValeurMémorisée) SI HTrouve(Clients) ALORS DocRemplace(TT_Proposition, "%Nom_Client%", Clients.Nom) DocRemplace(TT_Proposition, "%Prenom%", Clients.Prenom) POUR i = 1 _À_ TABLE_produits..Occurrence nIndiceLigneAjoute est un entier = Ajoute(PTableau.Tableau.Lignes) PTableau.Tableau.Cellules[1,1].Contenu.Texte = COL_produit[1] FIN FIN
Erreur :
Comment trouver mon paragraphe tableau ? Comment faire ? Bref, je pédale............
J.Michel,
-- Synchronize Systems International LTD Développement d'outils de gestion
Environnements AS400 – Windows Langages GAP III – CL – Visual Basic - Visual Adélia - Adélia - Windev http://www.cashpower.fr/
Bangkok / Pattaya |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 834 messages Popularité : +13 (13 votes) |
|
Posté le 03 novembre 2018 - 08:45 |
Aïl : Pas d'amateur.......... Je réitère......... |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 834 messages Popularité : +13 (13 votes) |
|
Posté le 08 novembre 2018 - 07:33 |
Je ré-essaye une dernière fois en espérant avoir plus de chance à trouver quelqu'un qui connait ce sujet........ Merci,
-- Synchronize Systems International LTD Développement d'outils de gestion
Environnements AS400 – Windows Langages GAP III – CL – Visual Basic - Visual Adélia - Adélia - Windev http://www.cashpower.fr/
Bangkok / Pattaya |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 1 304 messages Popularité : +47 (51 votes) |
|
Posté le 08 novembre 2018 - 09:40 |
Salut Jean-Michel,
L'instantiation de PTableau est incorrect
Remplace :
PTableau <= TT_Proposition..Paragraphe[1]
Par :
PTableau <- TT_Proposition..Paragraphe[1]
Et dis moi si tu as encore le problème.
A+ Daryl
-- http://www.concept4u2.com |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 834 messages Popularité : +13 (13 votes) |
|
Posté le 10 novembre 2018 - 06:18 |
Coucou Daryl !! ça fait longtemps............... Merci pour la correction (bisard que cela ne plante pas avec <=). NON, idem.............. Il ne trouve pas le tableau !!
J'ai regarder cette vidéo, il y a quelque chose qui m'échappe !
Voir à la minute 3:10 !
Help........... Merci Daryl,
-- Synchronize Systems International LTD Développement d'outils de gestion
Environnements AS400 – Windows Langages GAP III – CL – Visual Basic - Visual Adélia - Adélia - Windev http://www.cashpower.fr/
Bangkok / Pattaya |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 1 304 messages Popularité : +47 (51 votes) |
|
Posté le 11 novembre 2018 - 09:51 |
Salut Jean-Michel,
Je serais à ta place j'utiliserais des signets partout, car c'est nettement plus simple. Dans le code ci-dessous, j'ai gardé la recherche et remplacement pour les données clients et j'ai placé un signet dans le document pour le tableau des produits. Je travaille ensuite avec des fragments plutôt que des paragraphes
docFrag est un docFragment tabProduit est un docTableau
TT_Proposition est un Document TT_Proposition = DocOuvre(fRepExe + "\propal.docx")
HLitRecherche(Clients,IDClients,COMBO_Clients..ValeurMémorisée) SI HTrouve(Clients) ALORS docFrag = DocRecherche(TT_Proposition,"%Nom_Client%",MotComplet+SansCasse) docFrag..Texte = clients.Nom docFrag = DocRecherche(TT_Proposition,"%Prenom%",MotComplet+SansCasse) docFrag..Texte = clients.Prenom docFrag = TT_Proposition.Signet[SIGNET_PRODUITS] tabProduit = docFrag.Paragraphe[1].Tableau
POUR i = 1 _À_ TABLE_produits..Occurrence Insère(tabProduit.Lignes, 1)
tabProduit.Cellules[i, 1]..Contenu..Texte = COL_produit[1] FIN FIN
Supprime(tabProduit.Lignes, tabProduit.Lignes..Occurrence)
Tiens moi au courant du résultat
A+ Daryl
-- http://www.concept4u2.com |
| |
| |
| | | |
|
| | |
| |
Posté le 12 novembre 2018 - 04:32 |
T es super Daryl, J ai envie d'utiliser les signets, effectivement mais comment ecrire un signet en programation. J ai rien trouvé la dessus. Je veux remplacer %nom% par un signet. Comment faire zvec un docremplace ? Ou creer un signet : insertsignet n existe pas... Tu sais comment faire ? Encore merci.... |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 834 messages Popularité : +13 (13 votes) |
|
Posté le 12 novembre 2018 - 05:00 |
Merci Daryl, mais je suis coince avec les signets a moins que...... Comment remplacer dans un document des "%nom%" en un signet ? Comment ajouter un signet avec un ajoute ??
Je ne rien trouve dans la doc..... Si tu sais, alors, je pourrais m en sortir.
Merci......... J.Mi
-- Synchronize Systems International LTD Développement d'outils de gestion
Environnements AS400 – Windows Langages GAP III – CL – Visual Basic - Visual Adélia - Adélia - Windev http://www.cashpower.fr/
Bangkok / Pattaya |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 1 304 messages Popularité : +47 (51 votes) |
|
Posté le 14 novembre 2018 - 00:09 |
| |
| |
| | | |
|
| | | | |
| | |
| | |
| |
|
|
|