Bonjour à tous et bonne année,
Je cherche à récupérer 2 résultats d'une fonction VbScript pour alimenter 2 champs distincts sur le masque d'impression.
Est-ce que cela est possible, si oui, comment faire ?
Merci de votre aide.
VbScript
Moderators: Georges, milos, NiceLabel Support Team
Re: VbScript
Bonjour à tous,
je formule mon besoin différemment.
Dans une 1ère fonction Vbscrip, je centralise des paramètres balisés Rtf comme suit:
Dim Header, Footer, Titre1D_Nom1, Titre1F_Nom1, Titre1D_Nom2, Titre1F_Nom2, Titre1D_Nom3, Titre1F_Nom3
Header = "{\rtf1\deff0{\fonttbl{\f0 Arial Narrow;}{\f1 Arial Narrow;}}{\colortbl ;\red0\green0\blue255; }{\*\defchp \fs10}{\stylesheet {\ql\fs10 Normal;}{\*\cs1\fs10 Default Paragraph Font;}{\*\cs2\sbasedon1\fs10 Line Number;}{\*\cs3\ul\fs10\cf1 Hyperlink;}{\*\ts4\tsrowd\fs10\ql\tscellpaddfl3\tscellpaddl108\tscellpaddfb3\tscellpaddfr3\tscellpaddr108\tscellpaddft3\tsvertalc\cltxlrtb Normal Table;}{\*\ts5\tsrowd\sbasedon4\fs10\ql\trbrdrt\brdrs\brdrw10\brdrcf2\trbrdrl\brdrs\brdrw10\brdrcf2\trbrdrb\brdrs\brdrw10\brdrcf2\trbrdrr\brdrs\brdrw10\brdrcf2\trbrdrh\brdrs\brdrw10\brdrcf2\trbrdrv\brdrs\brdrw10\brdrcf2\tscellpaddfl3\tscellpaddl108\tscellpaddfb3\tscellpaddfr3\tscellpaddr108\tscellpaddft3\tsvertalc\cltxlrtb Table Simple 1;}}{\*\listoverridetable}\nouicompat\splytwnine\htmautsp\sectd\pard\plain\ql"
Footer = "\f1\fs10\par}"
Titre1D_Nom1 = "{\b\f1\fs35\cf1\qc "
Titre1F_Nom1 = "}{\f1\fs35\cf1}\qc"
Titre1D_Nom2 = "{\b\f1\fs42\cf1\qr "
Titre1F_Nom2 = "}{\f1\fs42\cf1}\qr"
Titre1D_Nom3 = "{\b\f1\fs21\cf1\ql "
Titre1F_Nom3 = "}{\f1\fs21\cf1}\ql"
Var1 = Header & Titre1D_Nom1 & "TATA" & Titre1F_Nom1 & Footer
Var2 = Header & Titre1D_Nom2 & "TITI" & Titre1F_Nom2 & Footer
Var3 = Header & Titre1D_Nom3 & "TOTO" & Titre1F_Nom3 & Footer
Ensuite, je souhaite récupérer les valeurs de ces 3 variables qui sont mises en formes, dans 3 autres fonctions permettant leurs affichages indépendants sur l'étiquette.
Serait-ce réalisable d'après vous ?
je formule mon besoin différemment.
Dans une 1ère fonction Vbscrip, je centralise des paramètres balisés Rtf comme suit:
Dim Header, Footer, Titre1D_Nom1, Titre1F_Nom1, Titre1D_Nom2, Titre1F_Nom2, Titre1D_Nom3, Titre1F_Nom3
Header = "{\rtf1\deff0{\fonttbl{\f0 Arial Narrow;}{\f1 Arial Narrow;}}{\colortbl ;\red0\green0\blue255; }{\*\defchp \fs10}{\stylesheet {\ql\fs10 Normal;}{\*\cs1\fs10 Default Paragraph Font;}{\*\cs2\sbasedon1\fs10 Line Number;}{\*\cs3\ul\fs10\cf1 Hyperlink;}{\*\ts4\tsrowd\fs10\ql\tscellpaddfl3\tscellpaddl108\tscellpaddfb3\tscellpaddfr3\tscellpaddr108\tscellpaddft3\tsvertalc\cltxlrtb Normal Table;}{\*\ts5\tsrowd\sbasedon4\fs10\ql\trbrdrt\brdrs\brdrw10\brdrcf2\trbrdrl\brdrs\brdrw10\brdrcf2\trbrdrb\brdrs\brdrw10\brdrcf2\trbrdrr\brdrs\brdrw10\brdrcf2\trbrdrh\brdrs\brdrw10\brdrcf2\trbrdrv\brdrs\brdrw10\brdrcf2\tscellpaddfl3\tscellpaddl108\tscellpaddfb3\tscellpaddfr3\tscellpaddr108\tscellpaddft3\tsvertalc\cltxlrtb Table Simple 1;}}{\*\listoverridetable}\nouicompat\splytwnine\htmautsp\sectd\pard\plain\ql"
Footer = "\f1\fs10\par}"
Titre1D_Nom1 = "{\b\f1\fs35\cf1\qc "
Titre1F_Nom1 = "}{\f1\fs35\cf1}\qc"
Titre1D_Nom2 = "{\b\f1\fs42\cf1\qr "
Titre1F_Nom2 = "}{\f1\fs42\cf1}\qr"
Titre1D_Nom3 = "{\b\f1\fs21\cf1\ql "
Titre1F_Nom3 = "}{\f1\fs21\cf1}\ql"
Var1 = Header & Titre1D_Nom1 & "TATA" & Titre1F_Nom1 & Footer
Var2 = Header & Titre1D_Nom2 & "TITI" & Titre1F_Nom2 & Footer
Var3 = Header & Titre1D_Nom3 & "TOTO" & Titre1F_Nom3 & Footer
Ensuite, je souhaite récupérer les valeurs de ces 3 variables qui sont mises en formes, dans 3 autres fonctions permettant leurs affichages indépendants sur l'étiquette.
Serait-ce réalisable d'après vous ?