bonjour , je souhaiterai savoir comment à partir d'un fichier excel (voir fichier attaché ) ,avoir le résulat ( voir fichier image joint ) dans un dossier "images" quand on a plus d'une centaine d'images et ref
merci
merci
Sub CopierCollerDansWord()
Dim Wapp As Object
[A3:B3].CurrentRegion.Copy
Application.DisplayAlerts = False 'si un document Word est ouvert
On Error Resume Next
Set Wapp = GetObject(, "Word.Application")
If Wapp Is Nothing Then Set Wapp = CreateObject("Word.Application")
Wapp.Visible = True
Wapp.Documents.Add.Content.Paste
Application.CutCopyMode = 0
End Sub
Sub CopierCollerDansWord()
Dim Wapp As Object, Wd As Object, i&
Application.ScreenUpdating = False
On Error Resume Next
Set Wapp = GetObject(, "Word.Application")
If Wapp Is Nothing Then Set Wapp = CreateObject("Word.Application")
Wapp.Visible = True
Set Wd = Wapp.Documents.Add
For i = Cells(Rows.Count, 2).End(xlUp).Row To 3 Step -1
Rows(i + 1).Insert
Rows(i + 1).RowHeight = 20
Cells(i + 1, 1) = Cells(i, 2)
Cells(i + 1, 1).HorizontalAlignment = xlCenter
Cells(i + 1, 1).VerticalAlignment = xlCenter
Cells(i, 1).Resize(2).CopyPicture 'photo des 2 cellules
Wd.Range(0, 0).Paste
Rows(i + 1).Delete
Next
Wapp.Documents("Images").Close
Wd.SaveAs ThisWorkbook.Path & "\Images" 'enregistrement
End Sub