• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

getDetailsOf method does not work

G

God Itself

#1
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=cach...tailsof+empty+string&cd=2&hl=pl&ct=clnk&gl=pl

regards
 
J

Joe Fawcett

#2
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=cach...tailsof+empty+string&cd=2&hl=pl&ct=clnk&gl=pl
>
> regards
 
G

God Itself

#3
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=cach...tailsof+empty+string&cd=2&hl=pl&ct=clnk&gl=pl
>>
>> regards
>
>
>
 
R

Richard Mueller [MVP]

#4
"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=cach...tailsof+empty+string&cd=2&hl=pl&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
--
 
G

God Itself

#5
Hi,

pls check this:
http://209.85.229.132/search?q=cach...tailsof+empty+string&cd=2&hl=pl&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.
 
R

Richard Mueller [MVP]

#6
"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=cach...tailsof+empty+string&cd=2&hl=pl&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
--
 
G

God Itself

#7
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...