Paste the following code into it's own BAS module (or convert it to a class if required)
'MS Windows API Function Prototypesprivate Declare Function GetProfileString Lib "kernel32" Alias _ "GetProfileStringA
This code sample shows how to retreive the vb object "printer" corresponding to the default printer.
Paste the following code into it's own BAS module (or convert it to a class if required)
'MS Windows API Function Prototypesprivate Declare Function GetProfileString Lib "kernel32" Alias _ "GetProfileStringA