
Populate combo box with directories from a given path
Hi There
The following function works inside Vb, How can I replicate the
functionality inside a outlook 98 form.
sub FillComboSaveAs
'Populate combo box with directories from a given path
nPath = "I:\images\" ' Set the path.
fName = Dir(nPath, vbDirectory) ' Retrieve the first entry.
Do While MyName <> "" ' Start the loop.
' Ignore the current directory and the encompassing directory.
If MyName <> "." And fName <> ".." Then
' Use bitwise comparison to make sure fName is a directory.
If (GetAttr(nPath & fName ) And vbDirectory) = vbDirectory Then
cboSaveAs.additem fName
End If ' it represents a directory.
End If
fName = Dir ' Get next entry.
Loop
end sub