|
-
Aug 26th, 2010, 01:22 AM
#1
Thread Starter
New Member
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
-
Aug 26th, 2010, 01:29 AM
#2
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/
-
Aug 26th, 2010, 01:47 AM
#3
Thread Starter
New Member
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?
-
Aug 26th, 2010, 01:51 AM
#4
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|