Results 1 to 10 of 38

Thread: TestsExplorerWSO

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #35
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    This is post
    https://www.excelfox.com/forum/showt...rerWSO?p=23973 &viewfull=1#post23973
    https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23972&viewfull=1#post23973
    https://www.excelfox.com/forum/showt...lorerWSO/page4
    https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO/page4#post23973



    Extended PropherKeys
    So it’s time to look at these in detail….
    Review
    Takes some file or folder, example, sample.wmv https://app.box.com/s/leu06ql1fu9uzt59wnoizedg85qoo7k4 , put it in the same folder as the file that contains this coding. Run the coding.
    Code:
    Sub QuickReviewWSOPropherKeys()   '     https://www.excelfox.com/forum/showthread.php/2951-TestsExplorerWSO?p=23973&viewfull=1#post23973
    Dim WSOobjWSO As Shell32.Shell     '    Early Binding
     Set WSOobjWSO = New Shell32.Shell    ' https://i.postimg.cc/Fz9zrnNm/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg  https://i.postimg.cc/sDC9S54h/Tools-Referrences-Microsoft-Shell-Controls-And-Automation.jpg
    Dim WSOobjWSOFolder As Shell32.Folder: Set WSOobjWSOFolder = WSOobjWSO.Namespace(ThisWorkbook.Path)
    Dim WSOobjWSOPassName As Shell32.FolderItem: Set WSOobjWSOPassName = WSOobjWSOFolder.ParseName("sample.wmv")
    Debug.Print WSOobjWSOPassName.ExtendedProperty("System." & "Size"): MsgBox prompt:=WSOobjWSOPassName.ExtendedProperty("System." & "Size"), Title:="sample.wmv  Size  Propherkey" '   643170
    Debug.Print
    Dim objWSO As Object      '  Late Binding
     Set objWSO = CreateObject("shell.application")    '
    Dim objWSOFolder As Object: Set objWSOFolder = objWSO.Namespace((ThisWorkbook.Path & ""))     '  ((   & ""  ))           ' https://stackoverflow.com/questions/33868233/shell-namespace-not-accepting-string-variable-but-accepting-string-itself/77888851#77888851     https://microsoft.public.access.narkive.com/Jl55mts5/problem-using-shell-namespace-method-in-vba#post5
    Dim objWSOPassName As Object: Set objWSOPassName = objWSOFolder.ParseName("sample.wmv")
    Debug.Print objWSOPassName.ExtendedProperty("System." & "Size"): MsgBox prompt:=objWSOPassName.ExtendedProperty("System." & "Size"), Title:="sample.wmv  Size  Propherkey"       '   643170
    Debug.Print
    End Sub
    
    That should tell you that the size of the file, sample.wmv is 643170
    Last edited by DocAElstein; 03-04-2024 at 02:49 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
  •