• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 990
  • Last Modified:

vb .net 2010 get file name title, author attributes

I would like to retrieve the file attributes such as title, author, that are displayed on the summary page of a file.
0
mphillip85
Asked:
mphillip85
1 Solution
 
kishoreb123Commented:
i got below code from here

Dim filename as string="c:\test\test.doc"
 Dim dso As DSOFile.OleDocumentProperties
 dso = New DSOFile.OleDocumentProperties
 dso.Open(filename.Trim, True,      DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess)
 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)

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now