Jump to content

ikanni

Members
  • Posts

    340
  • Joined

  • Last visited

  • Days Won

    9
  • Country

    Spain

ikanni last won the day on November 16 2020

ikanni had the most liked content!

2 Followers

Profile information

  • Localización:
    Tafalla

Converted

  • Campos
    ;

Recent Profile Visitors

2,721 profile views

ikanni's Achievements

  1. Hola, Te dejo una función que cambia el tamaño de una imagen. Úsalo cómo necesites. Uso el objeto Windows Image Acquisition (WIA). Además sin perder nada de calidad. Cualquier duda pregunta. Sub Llamamos() RutaOriginal = "C:\...\..\img1.xxx" RutaFinal= "C:\...\..\img1.xxx" Call WIA_CambiaTamano(RutaOriginal, RutaFinal, 400, 300) end sub Function WIA_CambiaTamano(RutaImgOriginal As String, RutaImgConvertida As String, _ AnchoMax As Long, AltoMax As Long) On Error GoTo error_Handler Dim oWIA As Object Dim oIP As Object Set oWIA = CreateObject("WIA.ImageFile") Set oIP = CreateObject("WIA.ImageProcess") With oIP .Filters.Add oIP.FilterInfos("Scale").FilterID .Filters(1).Properties("MaximumWidth") = AnchoMax .Filters(1).Properties("MaximumHeight") = AltoMax End With oWIA.LoadFile RutaImgOriginal Set oWIA = oIP.Apply(oWIA) oWIA.SaveFile RutaImgConvertida Error_Handler_Exit: On Error Resume Next If Not oIP Is Nothing Then Set oIP = Nothing If Not oWIA Is Nothing Then Set oWIA = Nothing Exit Function error_Handler: MsgBox "Ha ocurrido un error" & vbCrLf & vbCrLf & _ "Error Número: " & Err.Number & vbCrLf & _ "Error Dónde: WIA_CambiaTamano" & vbCrLf & _ "Error Descripción: " & Err.Description & _ Switch(Erl = 0, "", Erl <> 0, vbCrLf & "Linea No: " & Erl) _ , vbOKOnly + vbCritical, "Vaya!" Resume Error_Handler_Exit End Function
  2. Hola, Aquí hay algo https://vba846.wordpress.com/2019/11/24/automatizacion-word-excel/
  3. ikanni

    ManipularRegWin

    Version 1.0.0

    102 downloads

    Crear, manipular y eliminar registros en el 'Registro de Windows Espero os sirva. Ikanni
×
×
  • Create New...

Important Information

Privacy Policy