Announcement

Collapse
No announcement yet.

How to open a tif or jpg file using irfan view from excel vba macro

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to open a tif or jpg file using irfan view from excel vba macro

    I have written a excel macro which will pick up scanned images from a folder and show the file contents. based on the file contents, we will select the option and proceed with macro. Please suggest - Siva Chennai India

    #2
    I'm not familiar with Excel macros. I guess there should be a command to run external programs. Then it's easy, just run IrfanView and add the file name as a parameter.

    This question is more about Excel than IrfanView itself, so I moved the topic to more appropriate section.
    My system: IrfanView 4.62 64bit, Windows 10 22H2, Intel Core i5-3570, 16GB RAM, NVidia GTX 1050Ti 4GB

    Comment


      #3
      The command, you're looking for, is called Shell. Here's an example:
      Code:
      irfanview_path = "C:\Program Files\IrfanView\i_view64.exe"
      picture_path = "d:\pictures\some_picture.jpg"
      Shell(irfanview_path & " " & picture_path, 1)
      My system: IrfanView 4.62 64bit, Windows 10 22H2, Intel Core i5-3570, 16GB RAM, NVidia GTX 1050Ti 4GB

      Comment

      Working...
      X