Précédent   Forum des professionnels en informatique > Logiciels > Microsoft Office > Word > VBA Word
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 10/01/2012, 14h50   #1
Candidat au titre de Membre du Club
 
Homme
Inscription : novembre 2011
Messages : 60
Détails du profil
Informations personnelles :
Sexe : Homme

Informations forums :
Inscription : novembre 2011
Messages : 60
Points : 10
Points : 10
Par défaut Vba et variable

Bonjour à tous,

Le code ci-dessous permet d'imprimer en pdf une page définie par un signet.
Je souhaiterais faire évoluer le code ci-dessous sur encore quelques points :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Option Explicit
 
Sub Tst_WORD_Adobe_PDF()
Dim sNomFichierPS As String
Dim sNomFichierPDF As String
Dim sNomFichierLOG As String
Dim PDFDist As PdfDistiller
Dim PrinterDefault As String
PrinterDefault = Application.ActivePrinter
Application.ActivePrinter = "Adobe PDF"
 
  Selection.GoTo What:=wdGoToBookmark, Name:="conclusion1"
    Selection.WholeStory
    Options.DefaultHighlightColorIndex = wdNoHighlight
    Selection.Range.HighlightColorIndex = wdNoHighlight
 
sNomFichierPS = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "temp_conclusion1.ps"
    sNomFichierPDF = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "CONCLUSION1.pdf"
    sNomFichierLOG = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "CONCLUSION1.log"
 
    ActiveDocument.PrintOut OutputFileName:=sNomFichierPS, PrintToFile:=True, Background:=False, Range:=wdPrintCurrentPage, Copies:=1
 
    Set PDFDist = New PdfDistiller
    PDFDist.FileToPDF sNomFichierPS, sNomFichierPDF, ""
    Set PDFDist = Nothing
    Kill sNomFichierPS
    Kill sNomFichierLOG
 
    Selection.GoTo What:=wdGoToBookmark, Name:="conclusion2"
    sNomFichierPS = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "temp_conclusion2.ps"
    sNomFichierPDF = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "CONCLUSION2.pdf"
    sNomFichierLOG = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "CONCLUSION2.log"
 
    ActiveDocument.PrintOut OutputFileName:=sNomFichierPS, PrintToFile:=True, Background:=False, Range:=wdPrintCurrentPage, Copies:=1
 
    Set PDFDist = New PdfDistiller
    PDFDist.FileToPDF sNomFichierPS, sNomFichierPDF, ""
    Set PDFDist = Nothing
    Kill sNomFichierPS
    Kill sNomFichierLOG
 
 
   Selection.GoTo What:=wdGoToBookmark, Name:="conclusion3"
    sNomFichierPS = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "temp_conclusion3.ps"
    sNomFichierPDF = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "CONCLUSION3.pdf"
    sNomFichierLOG = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "CONCLUSION3.log"
 
    ActiveDocument.PrintOut OutputFileName:=sNomFichierPS, PrintToFile:=True, Background:=False, Range:=wdPrintCurrentPage, Copies:=1
 
    Set PDFDist = New PdfDistiller
    PDFDist.FileToPDF sNomFichierPS, sNomFichierPDF, ""
    Set PDFDist = Nothing
    Kill sNomFichierPS
    Kill sNomFichierLOG
 
    Application.ActivePrinter = PrinterDefault
End Sub
1 - Les fichiers pdf, une fois généré, ne s'ouvrent pas , pourtant les paramètres dans distiller sont cochés.

2- Pour que Kill sNomFichierLOG fonctionne le fichier .log doit porter le même nom que le fichier .pdf
Est-ce normal?

3 - A l'utilisation, je me rend compte qu'une "variable" est nécessaire pour le nom de fichier.

Je m'explique :
le nom des fichiers "conclusion1.pdf","conclusion2.pdf","conclusion3.pdf" doit être précédé d'un nom et ce nom n'est n'est jamais le même.
Exemple : "Patrice - conclusion1.pdf","Patrice - conclusion2.pdf","Patrice - conclusion3.pdf"
Si c'est "Patrice" c'est Patrice pour les 3 conclusions par contre.

J'ai pensais à un UserForm, ou autre, qui demanderais la variable avant de l'intégré au nom des 3 conclusions.

Étant donné mon niveau bien en dessous de mes ambitions, une âme charitable sera la bienvenue.


Peut être y a t il un chemin plus rapide et simple que l'userform?

Merci de votre aide, Thomas
tom0ne est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 10/01/2012, 20h27   #2
Expert Confirmé
 
Homme Philippe
ex Observeur CGG / Analyste prog.
Inscription : juin 2006
Messages : 1 713
Détails du profil
Informations personnelles :
Nom : Homme Philippe
Localisation : France, Finistère (Bretagne)

Informations professionnelles :
Activité : ex Observeur CGG / Analyste prog.

Informations forums :
Inscription : juin 2006
Messages : 1 713
Points : 3 652
Points : 3 652
Salut, pour le nom du log ou ps ou pdf seule l'extension change sinon comment veux-tu t'y retrouver si tu en as besoin, sinon Log et Ps sont effacés et donc la question ne se pose pas.

D'ou vient "Patrice", est-ce le nom de login Windows de l'utilisateur ?

Pour l'ouverture auto, jamais utilisé chez-moi donc pas de solution sauf via ShellExecute ?

Code :
1
2
3
4
5
 
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOWNORMAL = 1
 
ShellExecute hwnd, "Open", sFichier, 0&, 0&, SW_SHOWNORMAL
__________________
Pensez à Voter, d'avance merci. ( Pouces en bas à la droite de Citer )
Balisez votre code après l'avoir indenté sous Excel via Smart Indenter
Autre utilitaire : MZ Tools 3.0 VBA

Contribution : Excel / Word / PDF avec Adobe Acrobat Pro / PDFCreator 1 2
kiki29 est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 11/01/2012, 01h27   #3
Candidat au titre de Membre du Club
 
Homme
Inscription : novembre 2011
Messages : 60
Détails du profil
Informations personnelles :
Sexe : Homme

Informations forums :
Inscription : novembre 2011
Messages : 60
Points : 10
Points : 10
Salut,
Merci de ta réponse.
Citation:
Envoyé par kiki29 Voir le message
pour le nom du log ou ps ou pdf seule l'extension change sinon comment veux-tu t'y retrouver si tu en as besoin, sinon Log et Ps sont effacés et donc la question ne se pose pas.
En fait, si je nomme comme ci-dessous, où le .pdf ne porte pas le même nom que le .ps, je reçois l'erreur suivante au moment du Kill sNomFichierLOG ----> "Fichier introuvable.

Code :
1
2
3
sNomFichierPS = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "temp_conclusion1.ps"
    sNomFichierPDF = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "CONCLUSION1.pdf"
    sNomFichierLOG = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "temp_conclusion1.log"
Citation:
Envoyé par kiki29 Voir le message
D'ou vient "Patrice", est-ce le nom de login Windows de l'utilisateur ?
Non non ce n'est pas le nom du pc.
Une fois les conclusions générées, je dois les envoyées à un collégue.
ça peu être Patrice ou marie ou sébatien ou autre.

J'aurais aimé que le code me demande le prénom afin de l'intégrer dans le nom du fichier pdf généré.
Si le code génére conclusion1.pdf, je souhaiterai qu'il le nomme "Prenom-conclusion1.pdf

Je ne suis pas très clair mais ce n'est pas évident à écrire.



Citation:
Envoyé par kiki29 Voir le message
Pour l'ouverture auto, jamais utilisé chez-moi donc pas de solution sauf via ShellExecute ?
Ok merci, je testerai demain

Merci beaucoup,
bonne nuit,

Thomas
tom0ne est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/01/2012, 05h47   #4
Expert Confirmé
 
Homme Philippe
ex Observeur CGG / Analyste prog.
Inscription : juin 2006
Messages : 1 713
Détails du profil
Informations personnelles :
Nom : Homme Philippe
Localisation : France, Finistère (Bretagne)

Informations professionnelles :
Activité : ex Observeur CGG / Analyste prog.

Informations forums :
Inscription : juin 2006
Messages : 1 713
Points : 3 652
Points : 3 652
Salut, créer une UserForm avec 2 boutons et une ComboBox

Code UserForm
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Option Explicit
 
Private Sub BtnAnnuler_Click()
    Unload Me
End Sub
 
Private Sub BtnOk_Click()
    If ComboBox1.ListIndex = -1 Then
        ComboBox1.SetFocus
        MsgBox "Sélectionner un Nom", vbOKOnly + vbInformation
    Else
        sNom = Me.ComboBox1.Value
        Tst_WORD_Adobe_PDF
    End If
End Sub
 
Private Sub UserForm_Initialize()
    With ComboBox1
        .Clear
        .AddItem "A"
        .AddItem "B"
        .AddItem "C"
    End With
End Sub
Dans Module1
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Option Explicit
 
Public sNom As String
 
Sub Tst()
    UserForm1.Show
End Sub
 
Sub Tst_WORD_Adobe_PDF()
Dim sNomFichierPS As String
Dim sNomFichierPDF As String
Dim sNomFichierLOG As String
	.....
	sNomFichierPS = ActiveDocument.Path & "\" & sNom & "-Essai.ps"
	etc .....
Il te reste à créer une boucle de 1 à 3 pour balayer tes BookMarks, qqch comme ceci ( pas testé ) et à adapter avec le code ci-dessus

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
    For i = 1 To 3
        Selection.GoTo What:=wdGoToBookmark, Name:="conclusion" & i
        sNomFichierPS = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "CONCLUSION" & i & ".ps"
        sNomFichierPDF = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "CONCLUSION" & i & ".pdf"
        sNomFichierLOG = "E:\Documents and Settings\Thom@s\Bureau" & "\" & "CONCLUSION" & i & ".log"
 
        ActiveDocument.PrintOut OutputFileName:=sNomFichierPS, _
                                PrintToFile:=True, _
                                Background:=False, _
                                Range:=wdPrintCurrentPage
 
        Set PDFDist = New PdfDistiller
        PDFDist.FileToPDF sNomFichierPS, sNomFichierPDF, ""
        Set PDFDist = Nothing
        Kill sNomFichierPS
        Kill sNomFichierLOG
    Next i
__________________
Pensez à Voter, d'avance merci. ( Pouces en bas à la droite de Citer )
Balisez votre code après l'avoir indenté sous Excel via Smart Indenter
Autre utilitaire : MZ Tools 3.0 VBA

Contribution : Excel / Word / PDF avec Adobe Acrobat Pro / PDFCreator 1 2
kiki29 est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 11/01/2012, 19h49   #5
Candidat au titre de Membre du Club
 
Homme
Inscription : novembre 2011
Messages : 60
Détails du profil
Informations personnelles :
Sexe : Homme

Informations forums :
Inscription : novembre 2011
Messages : 60
Points : 10
Points : 10
Salut,
J'avance à petit pas et je te remercie de la patience dont tu fais preuve avec moi,

J'ai créer l'userform.
1 TextBox
1 bouton ok
1 bouton annuler

Ton code avec ComboBox est bien pensé mais ce ne sont jamais les mêmes personnes auxquelles j'envoie les fichier.
Donc je ne peux pas établir une liste à l'avance.

voici ce que j'ai essayer de faire :
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Option Explicit
 
Private Sub BtnAnnuler_Click()
    Unload Me
End Sub
 
Private Sub BtnOk_Click()
 
        sNom = Me.TextBox1.Value
        Tst_WORD_Adobe_PDF
rs.Close
    End If
End Sub
 
Private Sub UserForm_Initialize()
    With TextBox1
 
    End With
End Sub
Je ne suis pas sûr de "rs.Close" pour fermer l'UserForm après avoir cliqué sur ok.
Peux tu me corriger?

Pour le code
Code :
1
2
3
4
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOWNORMAL = 1
 
ShellExecute hwnd, "Open", sFichier, 0&, 0&, SW_SHOWNORMAL
Je n'ai pas dû placer ce code au bon endroit car j'ai une erreur de compilation sur la ligne :

Code :
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Seuls des commentaires peuvent apparaître après EndSub, EndFunction ou EndProperty.

Mais ce n'est pas le plus important, si je dois ouvrir les fichiers à la main une fois généré, ça ne me tuera pas.

Je l'ai placé à la fin du code au hasard, comme ceci :
Code :
1
2
3
4
5
6
7
8
9
Kill sNomFichierPS
    Kill sNomFichierLOG
 
    Application.ActivePrinter = PrinterDefault
  Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOWNORMAL = 1
 
ShellExecute hwnd, "Open", sFichier, 0&, 0&, SW_SHOWNORMAL
End Sub
Merci encore,


Thomas
tom0ne est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/01/2012, 23h21   #6
Expert Confirmé
 
Homme Philippe
ex Observeur CGG / Analyste prog.
Inscription : juin 2006
Messages : 1 713
Détails du profil
Informations personnelles :
Nom : Homme Philippe
Localisation : France, Finistère (Bretagne)

Informations professionnelles :
Activité : ex Observeur CGG / Analyste prog.

Informations forums :
Inscription : juin 2006
Messages : 1 713
Points : 3 652
Points : 3 652
Re, dans UserForm
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Option Explicit
 
Private Sub BtnAnnuler_Click()
    Unload Me
End Sub
 
Private Sub BtnOk_Click()
    If Len(TextBox1) = 0 Then
        TextBox1.SetFocus
        MsgBox "Saisir un Prénom", vbOKOnly + vbInformation
    Else
        sNom = Me.TextBox1.Text
        Tst_WORD_Adobe_PDF2
    End If
End Sub
Dans Module1
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Option Explicit
 
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOWNORMAL = 1
 
Public sNom As String
 
Sub Tst()
    UserForm1.Show
End Sub
 
Sub Tst_WORD_Adobe_PDF2()
Dim sNomFichierPS As String
Dim sNomFichierPDF As String
Dim sNomFichierLOG As String
Dim PDFDist As PdfDistiller
Dim PrinterDefault As String, i As Long
Dim sCheminSettings As String, sSetting As String
Dim hwnd As Long
 
    PrinterDefault = Application.ActivePrinter
    Application.ActivePrinter = "Adobe PDF"
 
    sCheminSettings = "C:\Documents and Settings\All Users\Documents\Adobe PDF 6.0\Settings"
    sSetting = "Smallest File Size.joboptions"
 
    For i = 1 To 3
        Selection.GoTo What:=wdGoToBookmark, Name:="Essai" & i
        sNomFichierPS = ActiveDocument.Path & "\" & sNom & "-Signet" & i & ".ps"
        sNomFichierPDF = ActiveDocument.Path & "\" & sNom & "-Signet" & i & ".pdf"
        sNomFichierLOG = ActiveDocument.Path & "\" & sNom & "-Signet" & i & ".log"
 
        ActiveDocument.PrintOut OutputFileName:=sNomFichierPS, _
                                PrintToFile:=True, _
                                Background:=False, _
                                Range:=wdPrintCurrentPage
 
        Set PDFDist = New PdfDistiller
        PDFDist.FileToPDF sNomFichierPS, sNomFichierPDF, sCheminSettings & "\" & sSetting
        Set PDFDist = Nothing
 
        Kill sNomFichierPS
        Kill sNomFichierLOG
 
        ShellExecute hwnd, "Open", sNomFichierPDF, 0&, 0&, SW_SHOWNORMAL
    Next i
 
    Application.ActivePrinter = PrinterDefault
End Sub
__________________
Pensez à Voter, d'avance merci. ( Pouces en bas à la droite de Citer )
Balisez votre code après l'avoir indenté sous Excel via Smart Indenter
Autre utilitaire : MZ Tools 3.0 VBA

Contribution : Excel / Word / PDF avec Adobe Acrobat Pro / PDFCreator 1 2
kiki29 est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 11/01/2012, 23h53   #7
Candidat au titre de Membre du Club
 
Homme
Inscription : novembre 2011
Messages : 60
Détails du profil
Informations personnelles :
Sexe : Homme

Informations forums :
Inscription : novembre 2011
Messages : 60
Points : 10
Points : 10
re,
Merci encore,
J'apprends plein de chose dans la manière dont tu fais évoluer ce code,

quelques questions :

si je lance uniquement la macro -->
Code :
1
2
3
Sub Tst()
    UserForm1.Show
End Sub
J'ai une erreur sur sNom (erreur de compilation, variable non définie.)

Même erreur si je lance Sub Tst_WORD_Adobe_PDF2()

Sur la ligne
Code :
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Même erreur qu'avant :
Seuls des commentaires peuvent apparaître après EndSub, EndFunction ou EndProperty.

Enfin, que vas-tu chercher ici?
Code :
1
2
sCheminSettings = "C:\Documents and Settings\All Users\Documents\Adobe PDF 6.0\Settings"
    sSetting = "Smallest File Size.joboptions"
Moi c'est là
Code :
D:\Program Files\Adobe\Acrobat 6.0\Distillr\Settings
Je suis désolé, tu dois vraiment me prendre pour un boulet
Thomas
tom0ne est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/01/2012, 00h05   #8
Expert Confirmé
 
Homme Philippe
ex Observeur CGG / Analyste prog.
Inscription : juin 2006
Messages : 1 713
Détails du profil
Informations personnelles :
Nom : Homme Philippe
Localisation : France, Finistère (Bretagne)

Informations professionnelles :
Activité : ex Observeur CGG / Analyste prog.

Informations forums :
Inscription : juin 2006
Messages : 1 713
Points : 3 652
Points : 3 652
Re, en PJ mon fichier de test
__________________
Pensez à Voter, d'avance merci. ( Pouces en bas à la droite de Citer )
Balisez votre code après l'avoir indenté sous Excel via Smart Indenter
Autre utilitaire : MZ Tools 3.0 VBA

Contribution : Excel / Word / PDF avec Adobe Acrobat Pro / PDFCreator 1 2
kiki29 est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 12/01/2012, 00h08   #9
Candidat au titre de Membre du Club
 
Homme
Inscription : novembre 2011
Messages : 60
Détails du profil
Informations personnelles :
Sexe : Homme

Informations forums :
Inscription : novembre 2011
Messages : 60
Points : 10
Points : 10
ah je viens de trouver ça :
en déclarant une chaine : Dim sNom As String
dans Sub Tst_WORD_Adobe_PDF2() et Sub Tst
je n'ai plus les erreurs

Subsiste une erreur sur SW_SHOWNORMAL de la ligne
Code :
ShellExecute hwnd, "Open", sNomFichierPDF, 0&, 0&, SW_SHOWNORMAL
Je test ton fichier.
tom0ne est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/01/2012, 00h17   #10
Expert Confirmé
 
Homme Philippe
ex Observeur CGG / Analyste prog.
Inscription : juin 2006
Messages : 1 713
Détails du profil
Informations personnelles :
Nom : Homme Philippe
Localisation : France, Finistère (Bretagne)

Informations professionnelles :
Activité : ex Observeur CGG / Analyste prog.

Informations forums :
Inscription : juin 2006
Messages : 1 713
Points : 3 652
Points : 3 652
Re, dans le Post #6 , en haut de Module1
Citation:
Public sNom As String
A lire et assimiler ( entre autres ) http://silkyroad.developpez.com/VBA/LesVariables/#LV
__________________
Pensez à Voter, d'avance merci. ( Pouces en bas à la droite de Citer )
Balisez votre code après l'avoir indenté sous Excel via Smart Indenter
Autre utilitaire : MZ Tools 3.0 VBA

Contribution : Excel / Word / PDF avec Adobe Acrobat Pro / PDFCreator 1 2
kiki29 est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 12/01/2012, 00h47   #11
Candidat au titre de Membre du Club
 
Homme
Inscription : novembre 2011
Messages : 60
Détails du profil
Informations personnelles :
Sexe : Homme

Informations forums :
Inscription : novembre 2011
Messages : 60
Points : 10
Points : 10
Merci Kiki, ça marche super bien, tu es talentueux.

J'ai juste fait un petit tour dans les tabulations pour avoir le curseur dans le champ dés le lancement de la macro.

J'ai "trouvé" d’où viennent mes erreurs précédentes.

Je créais le code dans normal.dot.
Comme j'ai plusieurs documents et pour éviter de coller les macros dans tous, je préférerai mettre le code dans normal.dot

Mais alors là, si je le fait, j'ai de nouveaux les erreurs précédentes.

Y a-t-il une astuce pour utiliser le même code dans normal.dot (code et userform)?

C'est vraiment passionnant le VBA, j'ai trouvé mon orientation professionnelle je crois !

Bonne nuit,
tom0ne est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/01/2012, 01h37   #12
Expert Confirmé
 
Homme Philippe
ex Observeur CGG / Analyste prog.
Inscription : juin 2006
Messages : 1 713
Détails du profil
Informations personnelles :
Nom : Homme Philippe
Localisation : France, Finistère (Bretagne)

Informations professionnelles :
Activité : ex Observeur CGG / Analyste prog.

Informations forums :
Inscription : juin 2006
Messages : 1 713
Points : 3 652
Points : 3 652
Re, en sauvant cet ensemble sous forme de fichier Dot mais sous un autre nom que Normal.dot , aprés avoir supprimé les pages contenant des données de test ( voir PJ Post #8 reloadée en modèle .dot )
Il faudrait rendre ce code plus généraliste via l'UserForm : Nom des bookmarks , nombre de bookmarks, Nom des sauvegardes etc .....
Bref à toi de poursuivre

A lire la FAQ http://word.developpez.com/faq/
__________________
Pensez à Voter, d'avance merci. ( Pouces en bas à la droite de Citer )
Balisez votre code après l'avoir indenté sous Excel via Smart Indenter
Autre utilitaire : MZ Tools 3.0 VBA

Contribution : Excel / Word / PDF avec Adobe Acrobat Pro / PDFCreator 1 2
kiki29 est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 12/01/2012, 21h37   #13
Candidat au titre de Membre du Club
 
Homme
Inscription : novembre 2011
Messages : 60
Détails du profil
Informations personnelles :
Sexe : Homme

Informations forums :
Inscription : novembre 2011
Messages : 60
Points : 10
Points : 10
Parfait !!
C'est super bien, j'économise un temps de travail énorme !!!

Mille félicitations !
tom0ne est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 22h34.


 
 
 
 
Partenaires

Hébergement Web