BOnjour à tous,
Je sollicite votre aide parce que je suis bien bloqué, après avoir cherché nuit et jour je n'ai rien trouvé. MERCI D'AVANCE POUR VOS CONTRIBUTIONS.
Donc explication du problème:
J'ai une séquence qui crée dans une feuille word un tableau à 2 colonnes.
Dans la 2ème colonne, je souhaite en automatique créer une zone de dessin (CANVAS) dans laquelle on sélectionnerait une photo par le biais d'une interface type explorer, et qui insérait la photo dans la zone de dessin.
Voici le code:
"DONC ICI JE CHERCHE A COPIER LA PHOTO DANS LE CANVAS"
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
58
59
60
61
62
63
64 Sub Tableau_2() Dim MonDial As FileDialog Dim shpCanvas As Shape Dim sect As Table '---------------------------------------------------------------------------------------------------------------- 'Création du tableau a 2 colonnes "MARCHE BIEN" PROBLEME ETAPE SUIVANTE '---------------------------------------------------------------------------------------------------------------- 'Laisse un espace avant et un espace après Selection.Style = ActiveDocument.Styles("Normal") Selection.TypeParagraph Selection.TypeParagraph Selection.MoveUp Unit:=wdLine, Count:=1 ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:= _ 2, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _ wdAutoFitFixed Selection.Tables(1).Rows.HeightRule = wdRowHeightExactly Selection.Tables(1).Rows.Height = CentimetersToPoints(3) Selection.Tables(1).Rows.AllowBreakAcrossPages = False With Selection.Tables(1) .Borders(wdBorderLeft).LineStyle = wdLineStyleNone .Borders(wdBorderRight).LineStyle = wdLineStyleNone .Borders(wdBorderTop).LineStyle = wdLineStyleNone .Borders(wdBorderBottom).LineStyle = wdLineStyleNone .Borders(wdBorderVertical).LineStyle = wdLineStyleNone .Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone .Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone .Borders.Shadow = False End With With Options .DefaultBorderLineStyle = wdLineStyleSingle .DefaultBorderLineWidth = wdLineWidth050pt .DefaultBorderColor = wdColorAutomatic End With Selection.Tables(1).Select Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter Selection.Font.Name = "Arial" Selection.MoveLeft Unit:=wdCharacter, Count:=1 Selection.MoveRight Unit:=wdCell '--------------------------------------------------------------------------------------------------------------- 'insertion du canvas dans la case "NE MARCHE PAS" A L'AIDE???? '--------------------------------------------------------------------------------------------------------------- Set shpCanvas = Activeselection.InlineShapes.AddCanvas(Left:=100, Top:=75, Width:=200, Height:=300) '--------------------------------------------------------------------------------------------------------------- ' Module de recherche de photo "FONCTIONNE BIEN" '--------------------------------------------------------------------------------------------------------------- Set MonDial = Application.FileDialog( _ FileDialogType:=msoFileDialogOpen) With MonDial ' ICI tu peux , à l'aide des propriétés "filters" et "InitialFileName" affiner le travail .AllowMultiSelect = True .InitialFileName = ActiveDocument.Path '.FileName = "*.jpg" .Show End With '----------------------------------------------------------------------------------------------------------------- ' SEQUENCE DE COPIE DE PHOTO '-----------------------------------------------------------------------------------------------------------------
JE NE SAIS PAS QUOI METTRE
Partager