none
After June Microsoft office update 2016 GetDetailsof returning upto 8 columns only. RRS feed

  • Question

  • Hi,

    VBA used to access the file object and gets the tag property.

    obfFile.GetDetailsOf(File,18), returns tag property.

    After June, 2017 Microsoft office update, this method returning up to 8 columns only and after that it returning null values.

    Any solution please.

    • Moved by Bill_Stewart Tuesday, July 4, 2017 6:27 PM Move to more appropriate forum
    Tuesday, July 4, 2017 5:21 PM

All replies

  • I have the same problem.

    Debug.Print  objFolder.GetDetailsOf(objFolderItem, 24)

    This used to show the 'comments' from file properties. Now it's just blank. Only Title and a few others still work.

    This happened after a recent Microsoft Update.

    My workaround was to open every file and use:

    Set wb = Workbooks.Open(file.path)

    str = wb.BuiltinDocumentProperties("comments").Value

    wb.Close false

    It takes a long time for many files so this bug is very annoying.


    EGJ

    Tuesday, October 3, 2017 2:00 PM
  • Not a bug.  Only some files have that property.  The ones that don't will return nothing.


    \_(ツ)_/

    Tuesday, October 3, 2017 2:17 PM
  • All my incoming workbooks have comments by design. This is easy to see by right-clicking the file.

    In VBA I've checked properties from 0 to 300 and only the first 8 properties returns an value, like title, dates, etc.

    File properties used to show up with the code above but something have changed after an update.

    This is kind of annoying when I have macro-workbooks that are used by other people.


    EGJ

    Tuesday, October 3, 2017 2:53 PM
  • The properties are exposed by a control that is installed with Office.  If Office is not installed then these fields will not be available.


    \_(ツ)_/

    Tuesday, October 3, 2017 3:00 PM
  • Nope.  I have to agree after some more testing.  On Win 10 this no longer works with Office apps.

    pdfs, jpegs and mpegs all return the extended values.  Office doesn't.  I suspect a DLL is missing or not registered.


    \_(ツ)_/


    • Edited by jrv Tuesday, October 3, 2017 4:20 PM
    Tuesday, October 3, 2017 4:15 PM
  • Glad to see I'm not the only one:) I compared the references on an old computer (getDetailsOf working) with my updated PC:

    Visual Basic for Application:

    Old: C:\Program Files\...\VBA7.1

    New: C:\Program Files(x86)\...VBA

    Also Microsoft Office 15.0 Object Library vs Microsoft Office 16.0 Object Library

    and  Microsoft Excel 15.0 Object Library vs Microsoft Office 16.0 Object Library



    EGJ

    Wednesday, October 4, 2017 6:12 AM
  • the test code...

    Sub testGetDetailsOf()
    
        Dim objShell, objFolder, objFolderItem, item
        Dim i As Integer
    
        Set objShell = CreateObject("shell.application")
        Set objFolder = objShell.Namespace("C:\test")
        
        If (Not objFolder Is Nothing) Then
            For Each item In objFolder.items
                Set objFolderItem = objFolder.ParseName(item.Name)
                If (Not objFolderItem Is Nothing) Then
                    For i = 0 To 100
                        Debug.Print i & " " & objFolder.GetDetailsOf(objFolderItem, i)
                    Next
                End If
                Set objFolderItem = Nothing
            Next
        End If
        Set objFolder = Nothing
        Set objShell = Nothing
        
    End Sub



    EGJ

    Wednesday, October 4, 2017 6:41 AM
  • Glad to see I'm not the only one:) I compared the references on an old computer (getDetailsOf working) with my updated PC:

    Visual Basic for Application:

    Old: C:\Program Files\...\VBA7.1

    New: C:\Program Files(x86)\...VBA

    Also Microsoft Office 15.0 Object Library vs Microsoft Office 16.0 Object Library

    and  Microsoft Excel 15.0 Object Library vs Microsoft Office 16.0 Object Library



    EGJ

    Object library is not how this is done.  It is a call to the Shell application (File Explorer) and it requires a DLL called a Shell Metadata Handler.   The provider is installed by Office but is not visible anywhere.  That DLL is missing in Office 2016.  I suggest placing a call to MS Support and having them clarify that this has been removed.  It is possible that the support is only available in the full product and not available in the OneClick version.


    \_(ツ)_/



    • Edited by jrv Wednesday, October 4, 2017 9:54 AM
    Wednesday, October 4, 2017 9:50 AM
  • Indeed.

    I hope there is another way to read the file properties in VBA, without opening the files.


    EGJ

    Thursday, October 5, 2017 7:30 AM