On Thu, 05 Aug 2004 23:33:03 GMT, Derrald <re************ ****@sbcglobal. not> wrote:
¤
¤ I am trying to change the Summary info on an Access 2000 file using VB
¤ .net (I guess that VB6 would probably be the same). This is the summary
¤ information that shows up when you right click on the Access file in
¤ Explorer/Desktop and then click on the Summary tab.
¤
¤ I already figured out how to change the Summary Info from within Access,
¤ once it is opened. I also know how to do this for MS Word and Excel.
¤
¤ Any useful information would be appreciated.
For an Access database I believe you will need to use DAO via interop. The following is some classic
VB code that shows the object model reference:
Dim db As DAO.Database
Dim ws As DAO.Workspace
Dim prop As DAO.Property
Set ws = Workspaces(0)
Set db = ws.OpenDatabase ("e:\My Documents\db1.m db")
On Error Resume Next
For Each prop In db.Containers(" Databases").Doc uments("Summary Info").Properti es
Debug.Print prop.NAME & " : " & prop.Value
Next prop
Also note that some of the properties, such as Comments, are not available through the SummaryInfo
Document collection until information has been entered into those fields.
Paul ~~~
pc******@amerit ech.net
Microsoft MVP (Visual Basic)