home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 November
/
Pcwk1197.iso
/
LOTUS
/
Eng-ins
/
WORDPRO
/
DATASET.TPL
< prev
next >
Wrap
Text File
|
1995-06-25
|
1KB
|
31 lines
' Datasets are named sets of variables that can be attached to most objects
' Attach a dataset to the active document
' create a name for this dataset
' each dataset is indexed by name
' within each named dataset, multiple entries can be stored
Dim SetName As String
SetName = "CustomSet"
Dim MyDataSet As WPDataSetCollection
' Set MyData = Object
' Set MyDataSet = .Frame.Layout.WPDataset ' attach dataset to current frame
Set MyDataSet = .ActiveDocument.WPDataSets
Stat = MyDataSet(SetName$).SetData("Entry1","This is data for entry1")
Stat = MyDataSet(SetName$).SetData("Entry2","Store any text here")
' print the number of datasets attached to this document
' get the count for the WPDataSets collection for this object
Print "Number of datasets attached to object = " MyDataSet.Count
Print MyDataSet(SetName$).Getdata("Entry1","Default")
Print MyDataSet(SetName$).Getdata("Entry2","Default")
Forall CurrentSet In MyDataSet
Print CurrentSet.Name
End Forall