Save file dialog vbscript




















Viewed 31k times. CommonDialog" sfd. ShowOpen I can get an Open dialog, but there is no ShowSave method for this object as there seems to be for a similar object in Visual Basic non-script. Improve this question. JayK JayK 2, 1 1 gold badge 18 18 silver badges 25 25 bronze badges. CommonDialog" only works on Windows XP. It won't work under Windows Vista or later.

Is that relevant for you? Thank you for this hint. The more I Google this, the more it looks like there really isn't a universal solution. Some examples even open Internet Explorer and use its dialog box while hidden, which seems like a really bad idea to me. Is an external dependency like a DLL file you have to include with the script , or using a compiled language like VB 6, an option?

In the end, language and form of the executable are not important, so I could certainly rewrite the script. Everything that does not require additional software to be installed on the target machine except standard Windows components is possible in theory but as the script fulfills only a simple task it would be nice to avoid special dependencies and satellite files. Nubok: The solution that's provided doesn't actually use UserAccounts.

Instead, it uses MSComDlg. CommonDialog found in comdlg The last answer also indicates that there may still be problems with the approach using VBScript. Show 1 more comment. Active Oldest Votes. ShowSave Of course this object has a bunch of other methods and properties, and you'll probably want to configure the appropriate properties before launching the dialog.

Hope this helps. Let me know if you have any questions. Improve this answer. Sadly, it didn't work on my machine. I could not create an MSComDlg. CommonDialog object after setting this Registry key. I suppose the prerequisites to use this are to be found in the other comments on this page maybe you or sbd. But even if it did, generally one would have to assert or check this Registry key to be set before creating the dialog.

Correct me if I should be wrong, please. Nevertheless, thank you for your investigation! I have the same problem although I did what you suggested in the registry. My computer is Windows 7 in case that can have something to do with it even if I doubt it. Add a comment. That being said, here are a couple of possible workarounds: If you're leaning towards accepting any of the already-suggested answers, you've already decided to introduce an external dependency on a DLL file to your VBScript deployment.

Community Bot 1 1 1 silver badge. I personally don't think that it is a good idea to recommend VB 6 since it it has been retired and deprecated i. Nubok: Yeah, I agree. I sort of addressed that, particularly in the third suggestion. But then again, consider the person to whom this advice is targeted.

Log In. Thank you for helping keep Tek-Tips Forums free from inappropriate posts. The Tek-Tips staff will check this out and take appropriate action. Click Here to join Tek-Tips and talk with other members! Already a Member? Join your peers on the Internet's largest technical computer professional community. It's easy to join and it's free.

Register now while it's still free! Already a member? Close this window and log in. Join Us Close. Join Tek-Tips Forums! Join Us! This opens the named PDF.

What code do I need to save that opened file as, like a SaveAs.. If so, use FileSystemObject :. Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 5 years ago. Active 5 years ago. Viewed 2k times. Quit End If. This sample script is not supported by Cruto or Microsoft under any support program or service. The sample script is provided AS IS without warranty of any kind.



0コメント

  • 1000 / 1000