Learn how to a build a cloud-first strategyRegister Now


IE Print compand in .net does not work when running from program files app folder

Posted on 2008-11-19
Medium Priority
Last Modified: 2012-05-05
I have narrowed down an issue that is really really interesting. With IE6 installed our application works just fine. It will use the .ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT2 command just fine while running from the program files installed location. Once Installing IE7 or greater our application will not fire the .ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT2 command or the AxSHDocVw.AxWebBrowser.PrintDocument(opt) comand or mshtml.IHTMLDocument2.execCommand("Print", ShowUI, Nothing) will not fire from within the program files folder in the installed application directory. IT does work from visual studio in any mode. It does work from any other folder.  I have a much smaller application that works anywhere but it also does not work in that folder it works in a sub folder but not that folder.

c:\program files\app\code\app.exe NOT WORKING
c:\program files\app\code\testapp.exe NOT WORKING
c:\program files\app\code\test\testapp.exe WORKING
c:\dev\test\testapp.exe WORKING
c:\dev\app\code\app.exe WORKING
c:\dev\app\code\app.exe Visual Studio WORKING
c:\dev\app\code\app.exe Visual Studio Debug WORKING
c:\dev\app\code\app.exe Visual Studio Relese WORKING

Something is blocking the brint funtionality from working from within that folder after IE7 is installed.
Im at a loss.

I have a included the print code I'm basing my print code off of. This is also the appliciton that I used to test and prove that it is all from that one folder. that it does not work. I also have a link to another thread that had the same issue but he did not realize that the issue was connected to his folder and not visual studio which i also thought for some time.....

So please any help would be great.


Question by:VertisMedia

Author Comment

ID: 22998948
I think I might have found it. I went through and systematicly removed all the third party dll's in that folder and found that the ieframe.dll file version 7.00.6000.16674 (vista_gdr.080415-1732) even though not used by this code was affecting the code indirectly. One of the inter ops being called from or the .net system code being called used it and because IE7 uses a new one or different one it was causing an issue with the current one in that folder...... Holly f what a bugger to fix.  please let me know what you think and or why and how this could have happened. This seams like a Microsoft compat issue righ? I have attached the dll for those who want to test or see this issue.

Accepted Solution

EE_AutoDeleter earned 0 total points
ID: 23406610
Because you have presented a solution to your own problem which may be helpful to future searches, this question is now PAQed and your points have been refunded.


Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question