{"id":10323,"date":"2011-06-28T07:00:00","date_gmt":"2011-06-28T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2011\/06\/28\/how-do-i-display-the-find-printers-dialog-programmatically\/"},"modified":"2011-06-28T07:00:00","modified_gmt":"2011-06-28T07:00:00","slug":"how-do-i-display-the-find-printers-dialog-programmatically","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20110628-00\/?p=10323","title":{"rendered":"How do I display the Find Printers dialog programmatically?"},"content":{"rendered":"<p>A customer wanted to display the Find Printers dialog programmatically to let the user pick a printer from Active Directory and wanted to know whether this was possible.\n Yes, it&#8217;s possible, and there&#8217;s more than one way to do it. There&#8217;s the lazy way and the overachieving way.\n The overachieving way is to use <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms676933.aspx\"> the <code>ICommon&shy;Query::Open&shy;Query&shy;Window<\/code> method<\/a>. The <code>Find&shy;AD&shy;Printers<\/code> sample function spells it all out for you.<\/p>\n<p> The lazy way takes a little bit of out-of-the-box thinking: Open the Find Printers dialog, set up the search the way you want it, and then save the search to a file (<i>File, Save Search<\/i>). In your program, when you need to open the Find Printers dialog, just <code>Shell&shy;Execute<\/code> the saved search. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>A customer wanted to display the Find Printers dialog programmatically to let the user pick a printer from Active Directory and wanted to know whether this was possible. Yes, it&#8217;s possible, and there&#8217;s more than one way to do it. There&#8217;s the lazy way and the overachieving way. The overachieving way is to use the [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-10323","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>A customer wanted to display the Find Printers dialog programmatically to let the user pick a printer from Active Directory and wanted to know whether this was possible. Yes, it&#8217;s possible, and there&#8217;s more than one way to do it. There&#8217;s the lazy way and the overachieving way. The overachieving way is to use the [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/10323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=10323"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/10323\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=10323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=10323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=10323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}