Scripting Week 3 Question and Answer Log
<http://www.microsoft.com/technet/scriptcenter/webcasts/sweek3/day4qanda.mspx>
"...
What is the best alternative to 'UserAccounts.CommonDialog' for an HTA
running on Windows 2003 server?
I assume you're looking for the File Open/File Save dialog boxes; you can
use the SAFRCFileDlg object. You can find an example of using the File Save
dialog box here:
http://www.microsoft.com/technet/scriptcenter/webcasts/sweek3/you-found-it.mspx.
..."
...which points you to...
The Scripting Week 3 Giveaway
<http://www.microsoft.com/technet/scriptcenter/webcasts/sweek3/you-found-it.mspx>
Maybe SAFRCFileDlg will work on Vista?
--
Michael Harris
Microsoft MVP Scripting
"Michael Harris (MVP)" <mikhar at mvps dot org> wrote in message
news:%23%23vgJkq3...@TK2MSFTNGP02.phx.gbl...
It iwll however still work for you on Vista. You just need to copy the
DLL from an XP machine and register it with REGSVR32. Vista security
will make you copy it to a folder other than System32 and register it
that way.
--
markdmac
------------------------------------------------------------------------
markdmac's Profile: http://forums.techarena.in/member.php?userid=21374
View this thread: http://forums.techarena.in/showthread.php?t=592925
Function GetFileName()
Set oWord = CreateObject("Word.Application")
oWord.ChangeFileOpenDirectory(CreateObject("Wscript.Shell").SpecialFolders("Desktop"))
oWord.FileDialog(msoFileDialogOpen).Title = "Please Select the
Additions File"
oWord.FileDialog(msoFileDialogOpen).AllowMultiSelect = False
If oWord.FileDialog(1).Show = -1 Then
oWord.WindowState = 2
For Each objFile in oWord.FileDialog(1).SelectedItems
GetFileName = objFile
Next
End If
oWord.Quit
End Function
--
spinzr0
------------------------------------------------------------------------
spinzr0's Profile: http://forums.techarena.in/members/spinzr0.htm
View this thread: http://forums.techarena.in/server-scripting/592925.htm
on error resume next
set fso=createobject("scripting.filesystemobject")
Set WshShell=WScript.CreateObject("Shell.Application")
dirPath=WshShell.BrowseForFolder(0, "select the path", 0,
"").items().item().path
if right(dirPath,1)<>"\" then
dirPath=dirpath&"\"
end if
if dirpath="\" then
dirpath="DOCUME~1\Admini~1\desktop\"
end if
msgbox dirpath
--
Lance Yan
------------------------------------------------------------------------
Lance Yan's Profile: http://forums.techarena.in/members/97060.htm