Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wdBuiltinProperties - where is my subject info??

Status
Not open for further replies.

cramd

Programmer
Mar 28, 2001
214
0
0
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top