Consulting

Results 1 to 4 of 4

Thread: Extended Properties for Word 2011 documents

  1. #1

    Extended Properties for Word 2011 documents

    Office for Windows allows one to read a document's extended properties without having to open the file. (A Windows tool called DSOFile.dll exists to make that process even easier).

    I am making the transition to Mac and Office 2011, but DSOFile does not work on a Mac and I really need a replacement for it. Does anyone know of a way to read a Word document's (or other Office file's) extended properties without opening the file.

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,776
    What are extended properties? It sounds like a Window's thing.
    But you might want to look into AppleScript. Office2011 VBA file handling is not well suited to Macs, but the MacScript command allows VBA to use AppleScript in VBA, which is well suited to Mac files.

  3. #3
    Quote Originally Posted by mikerickson
    What are extended properties? It sounds like a Window's thing.
    The 'subject' and 'author' and 'comments' and similar 'meta data' associated with each .doc and .docx file are the 'extended properties.' They can be 'read' (at least in a Windows environment) without fully opening the document. Looking for the way to do so in Mac VBA (Office 2011).

  4. #4
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,776
    For a closed file, something like this perhaps.

    [VBA]Dim filePath As String
    Dim strScript As String

    filePath = Application.GetOpenFilename
    If filePath = "False" Then Exit Sub: Rem canceled

    strScript = "tell application ""Finder"" "
    strScript = strScript & vbCr & "properties of file " & Chr(34) & filePath & Chr(34)
    strScript = strScript & vbCr & "end tell"

    Range("A1").Value = MacScript(strScript)
    [/VBA]

    AppleScript guide

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •