MS Word functionality in VB

  • Thread starter Thread starter KK
  • Start date Start date
K

KK

Hi All

I want exact functionality of commondialog box

in MS-Word goto Tools/Options/File Locations/Modify

Location.

I want to use it for setting the directory location and NOT for file

opening and saving.

Can you help me in same?

Waiting for reply.

Thanks And Regards,

KK
 
KK,
Not exactly like Word, but this gives you folder selection utility.
Dot Net may have another way.

Public Declare Function SHBrowseForFolder Lib "shell32" _
(lpbi As BrowseInfo) _
As Long

Public Type BrowseInfo
hWndOwner As Long
pIDLRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
lpfnCallback As Long
lParam As Long
iImage As Long
End Type

Public Const BIF_BROWSEFORCOMPUTER = &H1000 'Only returns computers. If
the user selects anything other than a computer, the OK button is grayed.
Public Const BIF_BROWSEFORPRINTER = &H2000 'Only returns printers. If
the user selects anything other than a printer, the OK button is grayed.
Public Const BIF_DONTGOBELOWDOMAIN = &H2 'Does not include network
folders below the domain level in the tree view control.
Public Const BIF_RETURNFSANCESTORS = &H8 'Only returns file system
ancestors. If the user selects anything other than a file system ancestor,
the OK button is grayed.
Public Const BIF_RETURNONLYFSDIRS = 1 'Only returns file system
directories. If the user selects folders that are not part of the file
system, the OK button is grayed.
Public Const BIF_STATUSTEXT = &H4 'Includes a status area in
the dialog box. The callback function can set the status text by sending
messages to the dialog box.

Public Declare Function SHGetPathFromIDList Lib "shell32" _
(ByVal pidList As
Long, _
ByVal lpBuffer As
String) _
As Long

Public Declare Sub CoTaskMemFree Lib "ole32.dll" _
(ByVal hMem As Long)



NickHK



| Hi All
|
| I want exact functionality of commondialog box
|
| in MS-Word goto Tools/Options/File Locations/Modify
|
| Location.
|
| I want to use it for setting the directory location and NOT for file
|
| opening and saving.
|
| Can you help me in same?
|
| Waiting for reply.
|
| Thanks And Regards,
|
| KK
|
|
 
* "Nick HK said:
KK,
Not exactly like Word, but this gives you folder selection utility.
Dot Net may have another way.

Public Declare Function SHBrowseForFolder Lib "shell32" _
(lpbi As BrowseInfo) _
As Long

That's why I sometimes hate X-Posts.
 
Please do not crosspost questions between .NET and non-.NET groups. If your
question is about VB.NET, please use the *.dotnet.* groups. If it is about
VB6 or earlier, use the *.vb.* groups.
 
Back
Top