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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

export word or excel document properties

Status
Not open for further replies.

jesp

Technical User
Jun 22, 2000
9
GB
I'd like to export information about the documents I'm working on to an access database. The file properties info in a binder, word or excel doc hold the kind of info that I want to record - any suggestions on how to export it or get it out of the document and into a useable format?

Jesp
 
CAn you be a little more specific. File data and time, last modified, that kind of stuff ???
 
Yes

Taking the example of a new word document, in the File / Properties / Custom box there is the facility to enter data under the headings "name", "type", and "value". Type refers to text, date, number or Y/N values. An example of the type of information that I would like to enter would be:

Name: Client Name,
Type: Text
Value: John Smith

This facility is great for adding quality control information to the document. However I would like to go one stage further and be able to export this data from the Word document into similarly structured fields within Access so that I can have a useable database incorporating quality control data from all of my documents.

Hope this gives you something more to think about

regards
JESP
 
This is straight out of the Word VBA help:

Set myRange = ActiveDocument.Content
myRange.Collapse Direction:=wdCollapseEnd
For Each prop In ActiveDocument.CustomDocumentProperties
With myRange
.InsertParagraphAfter
.InsertAfter prop.Name & "= "
.InsertAfter prop.Value
End With
Next

This example adds a custom built-in property to Sales.doc.

thename = InputBox("Please type your name", "Name")
Documents("Sales.doc").CustomDocumentProperties.Add _
Name:="YourName", LinkToContent:=False, Value:=thename, _
Type:=msoPropertyTypeString
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top