I am trying to access document properties from a network directory. Below is the code that I am testing, I can access the name, the modified date, but the results for subject is a "2" - not the actual document property subject.
Dim tbl As Word.Table = ThisDocument.Tables(1)
Dim fi As FileInfo
Dim di As New DirectoryInfo("c:\officedocs")
'start with row 2
Dim i As Integer = 2
For Each fi In di.GetFiles()
tbl.Rows.Add()
tbl.Cell(i, 1).Range.Text = fi.Name
tbl.Cell(i, 2).Range.Text = Word.WdBuiltInProperty.wdPropertySubject
tbl.Cell(i, 3).Range.Text = String.Format("{0:g}", fi.LastWriteTime)
i += 1
Next
************************************************
I am coding with VB.Net & Visual Studio Tools for Office. Version of MSOFFICE is 2003.
Any helpful hints would be appreciated!
cramd
Dim tbl As Word.Table = ThisDocument.Tables(1)
Dim fi As FileInfo
Dim di As New DirectoryInfo("c:\officedocs")
'start with row 2
Dim i As Integer = 2
For Each fi In di.GetFiles()
tbl.Rows.Add()
tbl.Cell(i, 1).Range.Text = fi.Name
tbl.Cell(i, 2).Range.Text = Word.WdBuiltInProperty.wdPropertySubject
tbl.Cell(i, 3).Range.Text = String.Format("{0:g}", fi.LastWriteTime)
i += 1
Next
************************************************
I am coding with VB.Net & Visual Studio Tools for Office. Version of MSOFFICE is 2003.
Any helpful hints would be appreciated!
cramd