Results 1 to 6 of 6
  1. #1
    JAPA1972 is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Jan 2019
    Posts
    17

    Having windows explorer show the width and height of a folder with pictures

    Hi

    I have an access application that that creates folders and dumps pictures in the created folders. For all these created folders, I would like windows explorer to show the height and width of the pictures. Is there way to do programmatically this with the aid of VBA?

    Thanks

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Why VBA? In File Explorer and with the folder view set to Details right click on a column header and choose Dimensions from the columns list. Done.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    alborg is offline Novice
    Windows 11 Office 365
    Join Date
    Dec 2022
    Location
    Virginia, USA
    Posts
    11
    I agree with Micron- if you can use IE to do the work, great.

    The VBA code to get the height/weight parameters, though, is as such-

    Dim IE As InternetExplorer
    Dim html As HTMLDocument
    Set IE = New InternetExplorerMedium
    IE.Visible = False
    IE.Navigate2 "c:\zfilemds\iconsjpgs\bu4.bmp"
    Set html = IE.Document
    Dim webImage As Variant
    Set webImage = html.getElementsByTagName("img")
    MsgBox ("Image is " & webImage(0).Width & " x " & webImage(0).Height)
    IE.Quit
    Set IE = Nothing

    If you wish to employ it into your VBA project, you can use an IE-like form s.a.:

    Click image for larger version. 

Name:	MSACCESS_hDWsUzIokS.png 
Views:	16 
Size:	153.0 KB 
ID:	51904

    I placed it in my public folder here: https://1drv.ms/u/s!Am9xB7i5mNRoreY8...5Zo1Q?e=uCiEYE

    Cheers,
    Al





  4. #4
    Join Date
    Jun 2022
    Posts
    28
    @alborg Does the InternetExplorer class still exist?

    Doesn't IE only refer to Edge in compatibility mode now?

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Quote Originally Posted by JAPA1972 View Post
    Hi

    I have an access application that that creates folders and dumps pictures in the created folders. For all these created folders, I would like windows explorer to show the height and width of the pictures. Is there way to do programmatically this with the aid of VBA?

    Thanks
    https://isladogs.co.uk/extended-file...ies/index.html
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    alborg is offline Novice
    Windows 11 Office 365
    Join Date
    Dec 2022
    Location
    Virginia, USA
    Posts
    11
    @seņor_sriracha Yeah, you're right. I'm more of a Firefox guy myself.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 04-16-2018, 06:41 AM
  2. Autosize a column's width and height?
    By Isla in forum Reports
    Replies: 1
    Last Post: 04-05-2016, 01:58 PM
  3. Setting Height and Width with VBA
    By MatthewR in forum Reports
    Replies: 9
    Last Post: 10-29-2015, 12:26 PM
  4. Image .jpg get original height and width using vba
    By WhiteBearMike in forum Programming
    Replies: 1
    Last Post: 05-27-2014, 04:47 PM
  5. Use fixed height and width for the Access window
    By AndrewAfresh in forum Access
    Replies: 3
    Last Post: 07-05-2006, 09:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums