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
| Public Sub Photo()
Dim Numero$
Dim No__$
Dim typephoto$
Dim typephoto__$(2)
typephoto__$(0) = "Vue générale"
typephoto__$(1) = "Vue rapprochée"
For x = 1 To Nbre
'j'ai supprimé plusieurs lignes de code pour l'insertion d'une image pour ne pas surcharger le post, je peux les remettre si besoin
WordBasic.BeginDialog 450, 100, "Photos"
WordBasic.Text 10, 10, 130, 13, "Numéro :", "Texte2"
WordBasic.TextBox 140, 8, 300, 18, "num"
WordBasic.Text 10, 30, 130, 13, "Type de photo :", "Texte3"
WordBasic.DropListBox 140, 28, 300, 60, typephoto__$(), "typephoto"
WordBasic.OKButton 150, 70, 150, 21
WordBasic.EndDialog
Set dlg = WordBasic.CurValues.UserDialog
WordBasic.Dialog.UserDialog dlg
Numero$ = dlg.num
ActiveWindow.ActivePane.SmallScroll Down:=11
WordBasic.InsertPara
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.TypeParagraph
WordBasic.Insert typephoto__$(dlg.typephoto)
typephoto$ = typephoto__$(dlg.typephoto)
Selection.TypeText Text:=" n°"
WordBasic.Insert Numeroscellé$
If x <> Nbre Then
WordBasic.InsertPara
WordBasic.InsertBreak Type:=0
End If
Next
WordBasic.EndOfDocument
End Sub |
Partager