Picture dimension

G

God Itself

Hi,

i have such a module:

Function Picturedimensions(filePath As String) As String

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

End Function

and it is working fine but only at work. i get empty value at home (also win
XP SP2, Office 2003, almost the same configuration). I checked paths, names,
VBA references... and nothing helps.. i guess that there may be problem with
windows scripting, but.. anyone experienced such a behaviour??

regards
 
G

God Itself

I noticed that problem is here:

Picturedimensions = .GetDetailsOf(.ParseName(strArgFileName), 26)

GetDetailsOf method returns null.

antivirus check, firewall check, what else may cause this strange
behaviour...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top