Results 1 to 4 of 4

Thread: i need t return the author of a document file in vb

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2010
    Posts
    7

    i need t return the author of a document file in vb

    i need t return the author of a document file in vb

    what i already did is:

    Try
    Dim sFileSize As String
    Dim location As String
    Dim lastTime As String
    Dim lastModified As String
    Dim name As String
    Dim finalString As String

    Dim FI As System.IO.FileInfo = New System.IO.FileInfo("C:\Users\Jean\Desktop\1.m4a")
    name = "File name: " + FI.Name.ToString
    sFileSize = "file length: " + FI.Length.ToString
    location = "File location: " + FI.Directory.ToString
    lastTime = "This file was last accessed on: " + FI.LastAccessTime.ToString
    lastModified = "This file was last modified on: " + FI.LastWriteTime.ToString


    finalString = name & vbCrLf & sFileSize & vbCrLf & location & vbCrLf & lastTime & vbCrLf & lastModified



    MsgBox(finalString)

    Catch ex As Exception
    MsgBox(ex.Message)
    End Try


    i need to get the author

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: i need t return the author of a document file in vb

    You can't get that information using purely managed code. You need a bit of COM.

    http://www.developerfusion.com/code/...ies-of-a-file/
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2010
    Posts
    7

    Re: i need t return the author of a document file in vb

    i already used that ... but how do i print the info that i got?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: i need t return the author of a document file in vb

    Printing has nothing to do with the topic of this thread. You get the author as a String, so you use it like any other String. If you want to know how to print text then that's a completely separate topic. If you don't actually mean "print" but rather just "display" then you would do it exactly as you're doing for the other info that you're already displaying. If you mean something else then you're going to spell it out because we won't guess.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

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



Click Here to Expand Forum to Full Width