Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionSub test() Dim chemin As String chemin = "E:\STATIQUE.tif" Shell ("rundll32.exe c:\windows\system32\shimgvw.dll,ImageView_Fullscreen" & " " & chemin) End Sub
Option Explicit Private Sub CommandButton1_Click() InserImage End Sub Sub InserImage() Dim chemin Sheets("Feuil1").Activate ChDir "C:" '<-- changez pour votre répertoire chemin = Application.GetOpenFilename _ ("Images (*.bmp;*.gif;*.jpg;*.tif),*.bmp;*.gif;*.jpg;*.tif") If chemin <> False Then Range("A1").Select ActiveSheet.Pictures.Insert(chemin).Select 'inserer image End If exportimage End Sub Sub exportimage() Application.DisplayAlerts = False Dim sh As Shape For Each sh In ActiveSheet.Shapes If sh.Type = 13 Then sh.Copy With ActiveSheet .ChartObjects.Add(0, 0, sh.Width, sh.Height).Chart.Paste .ChartObjects(1).Chart.Export Filename:="C:\monimage.gif", FilterName:="gif" .Shapes(ActiveSheet.Shapes.Count).Delete End With End If Next Selection.Cut 'supprime l'image Application.DisplayAlerts = True End Sub
Option Explicit Public Sub AAAA() InserImage End Sub Private Sub InserImage() Dim chemin Sheets("Feuil1").Activate ChDir "C:" '<-- changez pour votre répertoire chemin = Application.GetOpenFilename("Images (*.bmp;*.gif;*.jpg;*.tif),*.bmp;*.gif;*.jpg;*.tif") If chemin <> False Then Range("A1").Select ActiveSheet.Pictures.Insert(chemin).Select 'inserer image End If exportimage End Sub Private Sub exportimage() Application.DisplayAlerts = False Dim sh As Shape For Each sh In ActiveSheet.Shapes If sh.Type = 13 Then sh.Copy With ActiveSheet .ChartObjects.Add(0, 0, sh.Width, sh.Height).Chart.Paste .ChartObjects(1).Chart.Export Filename:="C:\Documents and Settings\ANDRE\Bureau\Nouveau dossier\MonImage.bmp", FilterName:="bmp" .Shapes(ActiveSheet.Shapes.Count).Delete End With End If Next Selection.Cut 'supprime l'image Application.DisplayAlerts = True End Sub
Private Sub CommandButton1_Click() Dim chemin chemin = Application.GetOpenFilename( _ "Fichiers Image (*.jpg;*.gif;*.png;*.tif;*.bmp),*.jpg;*.gif;*.png;*.tif;*.bmp") If chemin = False Then Exit Sub Image1.Picture = LoadPicture(chemin) SavePicture Image1.Picture, "C:\monimage.bmp" End Sub
C'est dommage que tu ne veuilles pas te servir de la Windows Image Acquisition Bibliothèque v2.0 avec: wiaaut.dll
Je t'aurais fait un code simple de conversion.