Windows Vista Forums

getDetailsOf method does not work

  1. #1


    God Itself Guest

    getDetailsOf method does not work

    Hi,

    i wrote a module-function (VBA) using method GetDetailsOf():

    Set FSO = CreateObject("Scripting.FileSystemObject")

    If FSO.FileExists(filePath) Then

    strParent = FSO.GetParentFolderName(filePath)
    strArgFileName = FSO.GetFileName(filePath)

    With CreateObject("Shell.Application").Namespace(strParent)
    Picturedimensions = .GetDetailsOf(.ParseName(strArgFileName), 26)
    End With

    End If

    Set FSO = Nothing

    GetDetailsOf returns (don't know why) empty string.

    Antivir checked, firewall checked, path and references also... and no idea

    Here is quite a solution to similar case but it does not work: http://209.85.229.132/search?q=cache...&ct=clnk&gl=pl

    regards

      My System SpecsSystem Spec

  2.   


  3. #2


    Joe Fawcett Guest

    Re: getDetailsOf method does not work

    This group is VBScript rather than VBA but your code is more or less
    agnostic between the two.
    I would get rid of the 'With part' and use full references and smaller
    steps. Then see what you have at each stage.
    For example:
    Dim item
    Set item = CreateObject("Shell.Application").Namespace(strParent)

    Now examine item in the debugger to see if it's what you expect.

    --

    Joe Fawcett (MVP - XML)
    http://joe.fawcett.name


    "God Itself" <god@xxxxxx> wrote in message
    news:gqiade$bt3$1@xxxxxx

    > Hi,
    >
    > i wrote a module-function (VBA) using method GetDetailsOf():
    >
    > Set FSO = CreateObject("Scripting.FileSystemObject")
    >
    > If FSO.FileExists(filePath) Then
    >
    > strParent = FSO.GetParentFolderName(filePath)
    > strArgFileName = FSO.GetFileName(filePath)
    >
    > With CreateObject("Shell.Application").Namespace(strParent)
    > Picturedimensions = .GetDetailsOf(.ParseName(strArgFileName), 26)
    > End With
    >
    > End If
    >
    > Set FSO = Nothing
    >
    > GetDetailsOf returns (don't know why) empty string.
    >
    > Antivir checked, firewall checked, path and references also... and no idea
    >
    > Here is quite a solution to similar case but it does not work:
    > http://209.85.229.132/search?q=cache...&ct=clnk&gl=pl
    >
    > regards



      My System SpecsSystem Spec

  4. #3


    God Itself Guest

    Re: getDetailsOf method does not work

    Hi,

    i know that code is written in VBA (not in VBS) but the problem is not the syntax but reference to function GetDetailsOf

    there is "something" in my system what blocks this function. GetDetailsOf(,26) returns empty string instead i.e. "450 x 650". I have no idea what it can be...

    regards

    Użytkownik "Joe Fawcett" <joefawcett@xxxxxx> napisał w wiadomości news:uyKV9atrJHA.4592@xxxxxx

    > This group is VBScript rather than VBA but your code is more or less
    > agnostic between the two.
    > I would get rid of the 'With part' and use full references and smaller
    > steps. Then see what you have at each stage.
    > For example:
    > Dim item
    > Set item = CreateObject("Shell.Application").Namespace(strParent)
    >
    > Now examine item in the debugger to see if it's what you expect.
    >
    > --
    >
    > Joe Fawcett (MVP - XML)
    > http://joe.fawcett.name
    >
    >
    > "God Itself" <god@xxxxxx> wrote in message
    > news:gqiade$bt3$1@xxxxxx

    >> Hi,
    >>
    >> i wrote a module-function (VBA) using method GetDetailsOf():
    >>
    >> Set FSO = CreateObject("Scripting.FileSystemObject")
    >>
    >> If FSO.FileExists(filePath) Then
    >>
    >> strParent = FSO.GetParentFolderName(filePath)
    >> strArgFileName = FSO.GetFileName(filePath)
    >>
    >> With CreateObject("Shell.Application").Namespace(strParent)
    >> Picturedimensions = .GetDetailsOf(.ParseName(strArgFileName), 26)
    >> End With
    >>
    >> End If
    >>
    >> Set FSO = Nothing
    >>
    >> GetDetailsOf returns (don't know why) empty string.
    >>
    >> Antivir checked, firewall checked, path and references also... and no idea
    >>
    >> Here is quite a solution to similar case but it does not work:
    >> http://209.85.229.132/search?q=cache...&ct=clnk&gl=pl
    >>
    >> regards
    >
    >
    >

      My System SpecsSystem Spec

  5. #4


    Richard Mueller [MVP] Guest

    Re: getDetailsOf method does not work


    "God Itself" <god@xxxxxx> wrote in message
    news:gqii98$ne8$1@xxxxxx
    Hi,

    i know that code is written in VBA (not in VBS) but the problem is not the
    syntax but reference to function GetDetailsOf

    there is "something" in my system what blocks this function.
    GetDetailsOf(,26) returns empty string instead i.e. "450 x 650". I have no
    idea what it can be...

    regards

    Uzytkownik "Joe Fawcett" <joefawcett@xxxxxx> napisal w wiadomosci
    news:uyKV9atrJHA.4592@xxxxxx

    > This group is VBScript rather than VBA but your code is more or less
    > agnostic between the two.
    > I would get rid of the 'With part' and use full references and smaller
    > steps. Then see what you have at each stage.
    > For example:
    > Dim item
    > Set item = CreateObject("Shell.Application").Namespace(strParent)
    >
    > Now examine item in the debugger to see if it's what you expect.
    >
    > --
    >
    > Joe Fawcett (MVP - XML)
    > http://joe.fawcett.name
    >
    >
    > "God Itself" <god@xxxxxx> wrote in message
    > news:gqiade$bt3$1@xxxxxx

    >> Hi,
    >>
    >> i wrote a module-function (VBA) using method GetDetailsOf():
    >>
    >> Set FSO = CreateObject("Scripting.FileSystemObject")
    >>
    >> If FSO.FileExists(filePath) Then
    >>
    >> strParent = FSO.GetParentFolderName(filePath)
    >> strArgFileName = FSO.GetFileName(filePath)
    >>
    >> With CreateObject("Shell.Application").Namespace(strParent)
    >> Picturedimensions = .GetDetailsOf(.ParseName(strArgFileName), 26)
    >> End With
    >>
    >> End If
    >>
    >> Set FSO = Nothing
    >>
    >> GetDetailsOf returns (don't know why) empty string.
    >>
    >> Antivir checked, firewall checked, path and references also... and no
    >> idea
    >>
    >> Here is quite a solution to similar case but it does not work:
    >> http://209.85.229.132/search?q=cache...&ct=clnk&gl=pl
    >>
    >> regards
    >
    I also get an empty string when I use GetDetailsOf to retrieve "Dimensions"
    (index 26). I tried several files(*.jpg, *.bmp, and others). I don't know
    why.

    --
    Richard Mueller
    MVP Directory Services
    Hilltop Lab - http://www.rlmueller.net
    --



      My System SpecsSystem Spec

  6. #5


    God Itself Guest

    Re: getDetailsOf method does not work

    Hi,

    pls check this:
    http://209.85.229.132/search?q=cache...&ct=clnk&gl=pl

    there is solution to add a DWORD to shell extensions, but it doesn't work in my case.
    Empty string may be also result of windows update no 908531

    anyway pls paste code from my first post to VBA in excel and call this function to receive dimensions. This is only a way to check whether GetDetailsOf work proprietly.
    i hove you use windows XP.. (,26) returns dimensions only in this windows!
    Now, i'm at work and this function works fine, but at home i have problem with this!

    regards

    Użytkownik "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> napisał w wiadomości news:%23bSlVNurJHA.4684@xxxxxx

    >
    > "God Itself" <god@xxxxxx> wrote in message
    > news:gqii98$ne8$1@xxxxxx
    > Hi,
    >
    > i know that code is written in VBA (not in VBS) but the problem is not the
    > syntax but reference to function GetDetailsOf
    >
    > there is "something" in my system what blocks this function.
    > GetDetailsOf(,26) returns empty string instead i.e. "450 x 650". I have no
    > idea what it can be...

    I also get an empty string when I use GetDetailsOf to retrieve "Dimensions"
    (index 26). I tried several files(*.jpg, *.bmp, and others). I don't know
    why.



      My System SpecsSystem Spec

  7. #6


    Richard Mueller [MVP] Guest

    Re: getDetailsOf method does not work


    "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> wrote in
    message news:%23bSlVNurJHA.4684@xxxxxx

    >
    > "God Itself" <god@xxxxxx> wrote in message
    > news:gqii98$ne8$1@xxxxxx
    > Hi,
    >
    > i know that code is written in VBA (not in VBS) but the problem is not the
    > syntax but reference to function GetDetailsOf
    >
    > there is "something" in my system what blocks this function.
    > GetDetailsOf(,26) returns empty string instead i.e. "450 x 650". I have no
    > idea what it can be...
    >
    > regards
    >
    > Uzytkownik "Joe Fawcett" <joefawcett@xxxxxx> napisal w
    > wiadomosci news:uyKV9atrJHA.4592@xxxxxx

    >> This group is VBScript rather than VBA but your code is more or less
    >> agnostic between the two.
    >> I would get rid of the 'With part' and use full references and smaller
    >> steps. Then see what you have at each stage.
    >> For example:
    >> Dim item
    >> Set item = CreateObject("Shell.Application").Namespace(strParent)
    >>
    >> Now examine item in the debugger to see if it's what you expect.
    >>
    >> --
    >>
    >> Joe Fawcett (MVP - XML)
    >> http://joe.fawcett.name
    >>
    >>
    >> "God Itself" <god@xxxxxx> wrote in message
    >> news:gqiade$bt3$1@xxxxxx

    >>> Hi,
    >>>
    >>> i wrote a module-function (VBA) using method GetDetailsOf():
    >>>
    >>> Set FSO = CreateObject("Scripting.FileSystemObject")
    >>>
    >>> If FSO.FileExists(filePath) Then
    >>>
    >>> strParent = FSO.GetParentFolderName(filePath)
    >>> strArgFileName = FSO.GetFileName(filePath)
    >>>
    >>> With CreateObject("Shell.Application").Namespace(strParent)
    >>> Picturedimensions = .GetDetailsOf(.ParseName(strArgFileName), 26)
    >>> End With
    >>>
    >>> End If
    >>>
    >>> Set FSO = Nothing
    >>>
    >>> GetDetailsOf returns (don't know why) empty string.
    >>>
    >>> Antivir checked, firewall checked, path and references also... and no
    >>> idea
    >>>
    >>> Here is quite a solution to similar case but it does not work:
    >>> http://209.85.229.132/search?q=cache...&ct=clnk&gl=pl
    >>>
    >>> regards
    >>
    >
    > I also get an empty string when I use GetDetailsOf to retrieve
    > "Dimensions" (index 26). I tried several files(*.jpg, *.bmp, and others).
    > I don't know why.
    >
    > --
    > Richard Mueller
    > MVP Directory Services
    > Hilltop Lab - http://www.rlmueller.net
    > --
    >
    If find the code works on Windows Server 2003 and XP, but not on Vista. Also
    not on Windows 2000.

    --
    Richard Mueller
    MVP Directory Services
    Hilltop Lab - http://www.rlmueller.net
    --



      My System SpecsSystem Spec

  8. #7


    God Itself Guest

    Re: getDetailsOf method does not work


    Użytkownik "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxx> napisał w wiadomości news:Ofic5lurJHA.1504@xxxxxx

    > If find the code works on Windows Server 2003 and XP, but not on Vista. Also
    > not on Windows 2000.
    you're right - should work on XP but it does not on my XP. do not know why...

      My System SpecsSystem Spec

  9. #8



    Newbie
    Join Date : Apr 2009
    Posts : 1
    win2k, winxp, vista home premium x32
    Local Time: 07:46 PM


     

    Re: getDetailsOf method does not work

    What you wrote is for Windows XP. The GetDetailsOf() method you used is OS dependent & not compatible with Vista.

      My System SpecsSystem Spec


getDetailsOf method does not work
Similar Threads
Thread Forum
en-us names for ShellApp.GetDetailsOf columns, plz VB Script
Passing "| find" in command executed with EXEC method does not work VB Script
.ToLower() method doesn't work! PowerShell
.ToLower() method doesn't work! VB Script
Method invocation failed because [System.String] doesn't contain a method PowerShell