Community discussion forum

Retrieving the Summary properties of a file

This is a comment thread discussing Retrieving the Summary properties of a file
  • 10 years ago

    This thread is for discussions of Retrieving the Summary properties of a file.

  • 3 years ago

    Having trouble getting this too work.

    I've downloaded the ole file property reader linked at the bottom of the page. I registered the dll using regsvr32, but errors are being returned.

     

    Dim filename as string="c:\test\test.doc"
    Dim dso As DSOFile.OleDocumentProperties

    ' returns error "DSOFile.OleDocumentProperties not defined"

     dso = New DSOFile.OleDocumentProperties

    ' returns error "DSOFile.OleDocumentProperties not defined"
     dso.Open(filename.Trim, True, DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess)

    ' returns error "DSOFile not declared"


     Console.WriteLine(dso.SummaryProperties.Author)
    Console.WriteLine(dso.SummaryProperties.ByteCount)
    Console.WriteLine(dso.SummaryProperties.CharacterCount)
    Console.WriteLine(dso.SummaryProperties.CharacterCountWithSpaces)
    Console.WriteLine(dso.SummaryProperties.Comments)
    Console.WriteLine(dso.SummaryProperties.Company)
    Console.WriteLine(dso.SummaryProperties.DateCreated)
    Console.WriteLine(dso.SummaryProperties.DateLastSaved)
    Console.WriteLine(dso.SummaryProperties.LastSavedBy)
    Console.WriteLine(dso.SummaryProperties.LineCount)
    Console.WriteLine(dso.SummaryProperties.PageCount)
    Console.WriteLine(dso.SummaryProperties.ParagraphCount)
    Console.WriteLine(dso.SummaryProperties.RevisionNumber)
    Console.WriteLine(dso.SummaryProperties.Subject)
    Console.WriteLine(dso.SummaryProperties.Title)
    Console.WriteLine(dso.SummaryProperties.WordCount)















     

    How do I use this library after downloading it?

  • 3 years ago

    My above question was solved when I used the menu item Website > Add reference > com tab > dso ole document properties reader 2.0.

     

    However, when I try to open a file using:

    dso.Open(FileName, True, DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess)

    I get this error:

    The name  is not valid. (Exception from HRESULT: 0x800300FC (STG_E_INVALIDNAME))

     

  • 2 years ago
    I want to retrieve the document properties for a .pdf file
    This properties can be viewed by opening the file and from the file menu click on document properties
    Can anyone provide me a help for this



  • 2 years ago
    Its very urgent for me
    Can anyone provide me the solution


    anandparmar wrote:
    I want to retrieve the document properties for a .pdf file
    This properties can be viewed by opening the file and from the file menu click on document properties
    Can anyone provide me a help for this



  • 2 years ago
    Hi Anandparmar, Did you find a solution to this issue? I am trying to accomplish the same thing. Thanks, Spiro
  • 2 years ago

    Try this out--

    Import

    System.Runtime.InteropServices.COMException

     

  • 2 years ago

    Hi

     

    I m getting a  Error Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    when edit the properties of .tlf , .bmp  Image file using DSO File

    I m using Code as

    Imports System.runtime.InteropServices

    Dim objDocument As New DSOFile.OleDocumentPropertiesClass

    objDocument.SummaryProperties.Title = TextBox1.Text

    objDocument.SummaryProperties.Subject = TextBox2.Text

    objDocument.SummaryProperties.Comments = TextBox6.Text

     

    Please reply to this error as soon as possible

     

    Prashant

  • 1 year ago

    this code is working ....thanks

  • 1 year ago
    Hi
  • 1 year ago

    Hi,

    Code is working fine very help full.

    can u also please provide the code how to retirve the Owner of a file.

    from security.

    Thanks

    john

     

     

  • 1 year ago

     But I must tell that .. this .dll is only applicable to .doc files .. I am not sure whether it is same effective for .rtf or .txt file ?????

     

    can anyone confirm me about this ???         

  • 6 months ago

    Helo i am using the following code to extract the thumbnail from dso properties using Asp.Net application. _DSOFile.OleDocumentProperties dso = _DSOFile.Create.OleDocumentProperties(); try { dso.Open(pFileName, true, _DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess); * * _DSOFile.SummaryProperties properties = dso.SummaryProperties;**

                //_targetImage = 
                _targetImage = Microsoft.VisualBasic.Compatibility.VB6.Support.IPictureToImage(properties.Thumbnail);
                SaveImage(_targetImage, pTargetFile);
                return true;
            }
    

    i am experiencing the following error can somebody plz correct me or give me solution for this. i goggled on this i got some information about com dll's doesn't behave properly with Asp.Net application. If i use the same code in windows or console application this is working fine. this is issue with only Asp.Net web application.

    error is: catestrophic failure

Post a reply

Enter your message below

Sign in or Join us (it's free).

We'd love to hear what you think! Submit ideas or give us feedback