Article ID: 173552
Article Last Modified on 6/28/2004
Dim strSysDirPath As String
Dim vRetval As Double
Private Sub Form_Load()
'Setup the string to receive the name of the system directory
strSysDirPath = String$(145, Chr$(0))
strSysDirPath = Left$(strSysDirPath, _
GetSystemDirectory(strSysDirPath, _
Len(strSysDirPath)))
'Run the Mail Control Panel
vRetval = Shell(strSysDirPath & "\control.exe mlcfg32.cpl", 1)
'Do the rest of your work here. Note: Most developers will
'likely want to pause their application here until returning from
'the Control Panel
MsgBox vRetval
End Sub
Declare Function GetSystemDirectory& Lib "kernel32" _
Alias "GetSystemDirectoryA" (ByVal P$, ByVal S%)Keywords: kbhowto kbcode KB173552