Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - getDetailsOf method does not work

Reply
 
Old 03-27-2009   #1 (permalink)
God Itself


 
 

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
Old 03-27-2009   #2 (permalink)
Joe Fawcett


 
 

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
Quote:

> 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
Old 03-27-2009   #3 (permalink)
God Itself


 
 

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
Quote:

> 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
Quote:

>> 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
Old 03-27-2009   #4 (permalink)
Richard Mueller [MVP]


 
 

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
Quote:

> 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
Quote:

>> 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
Old 03-27-2009   #5 (permalink)
God Itself


 
 

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
Quote:

>
> "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
Old 03-27-2009   #6 (permalink)
Richard Mueller [MVP]


 
 

Re: getDetailsOf method does not work


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

>
> "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
Quote:

>> 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
Quote:

>>> 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
Old 03-27-2009   #7 (permalink)
God Itself


 
 

Re: getDetailsOf method does not work


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

> 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
Old 04-11-2009   #8 (permalink)


win2k, winxp, vista home premium x32
 
 

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
Reply

Thread Tools


Similar Threads
Thread Forum
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 not many Vista mail
Method invocation failed because [System.String] doesn't contain a method PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
Š Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46