how can I open a visio file in Webbrowser control without appear "open or save "dialog?

thanks for tips

Jian Chen
7/3/2003, 12:57:07 PM

0 replies


WebBrowser Object - Login and Verify
0 replies , 5/31/2006, 2:45:01 PM
I use the function below to open a new webbrowser and login to the page. I'm trying to see if the login is successful and if so i go to the next page, navigate from there somewhere else (only available if successful) and process the text on that page. 2 questions: 1) The function below works if the password and user are correct. However the check for invalid login does not. This is because, at that point, the focus is in the blank Username control, so select all doesn't select anything and the clipboard remains what it was (as opposed to getting the contents of the page). Is there a way to access the contents of the page? I can't select another object on the screen i don't think, because i don't think you can set the focus to something that isn't an editable control (ie i'd like have a method call that does the same thing as clicking on a blank part of the window so selectall will work). 2) Obviously, select all and copy aren't the most elegant solutions. I have been unable to use anything like IE.DocumentText for some reason. Any suggestions on how i can access the page without using selectall? The URL i'm doing this with is: -Begin function- Public Function LoginToIE(ByRef IE As Object, URL As String, UserName As String, Password As String, Pause As Long) As Boolean On Error GoTo Err_Handler Dim ClipboardStr As String LoginToIE = False Set IE = CreateObject("InternetExplorer.Application") Call WaitForIE(IE, Pause) IE.Navigate URL IE.Visible = True Call WaitForIE(IE, Pause) IE.Document.all("ilogin").select IE.Document.all("ilogin").Value = UserName IE.Document.all("ipassword").select IE.Document.all("ipassword").Value = Password SendKeys "{ENTER}" Call WaitForIE(IE, Pause) IE.Document.ExecCommand ("SelectAll") IE.Document.ExecCommand ("Copy") ClipboardStr = ClipBoard_GetData() If InStr(ClipboardStr, "Invalid Login") > 0 Then IE.Quit Set IE = Nothing MsgBox ("The User ID and Password supplied do not seem to be correct.") Exit Function End If LoginToIE = True Exit Function Err_Handler: MsgBox err.Description Set IE = Nothing End Function

Word 2007 / Webbrowser
1 replies , 2/5/2007, 8:44:52 AM
Hello I wanted to ask if someone else have experienced similar behaviour with showing a word document in the webbrowser component and what one can do to solve this problem. On a system with Office 2003 (and earlier version) i can open the word document in the webbrowser and it will be shown inside the webbrowser but when i open the document on a system with Office 2007 the document won't be displayed inside the webbrowser. Somehow the document creates an own Frame / Dialog which will pop in the front of the calling dialog. Are there any properties that i can use so that the frame wont appear and that the document will be shown insede the browser component as in the earlier versions of office? The application is written in VB6. Here an extract from my test code to show this behaviour: Private Sub Command1_Click() Dim filename As String CommonDialog1.ShowOpen filename = CommonDialog1.filename WebBrowser1.Navigate2 (filename) End Sub Any help / suggestion would be appreciated. pete

Hi, I want to integrate a Excel file in a windows form application to edit it, now I can do it using the WebBrowser in 2005 But, after I navigate a excel file in webbrowser in windows form, I double click another excel file in desktop, the Excel application cannot open it. How to open other excel file in excel application after navigate a excel file using WebBrowser in windows form? Thanks

In a Windows form application, I need to display webpages using the WebBrowser control. When the user clicks a button on the webpage, I need to detect this in the Form application. The webpages are coming from the cdrom drive. How do I detect actions within the WebBrowser control from the Container Forms application?

WebBrowser ExecWB failed
0 replies , 5/27/2004, 2:28:12 AM
Office Professional 2003 I have a WebBrowser control called ctlWebBrowser in a Word form. It gives a runtime error of Method ExecWB of object failed. Private Sub btnTransfer_Click() Call ctlWebBrowser.ExecWB(OLECMDID_OPEN, OLECMDEXECOPT_PROMPTUSER) End Sub It also doesn't like Call ctlWebBrowser.ExecWB(cmdID:=OLECMDID_SELECTALL, cmdexecopt:=OLECMDEXECOPT_DONTPROMPTUSER) Is there something I need to setup to make the ExecWB work? Thanks

I am currently working on an add-in for Word that communicates with a server to obtain various items and displays the results in a WebBrowser control. The information is obtained from the server either directly as HTML or as XML with the appropriate XSLT. Once viewed I want to allow the user to be able to save the results into the ActiveDocument. This is where I have run into a stumbling block. I am able to save the document to disk and then retrieve it into Word but it is rather ugly and includes having a SaveAs dialog in between steps. I would much rather have the entire process be seamless for the end user. Is there a way to move the realized HTML document into Word's ActiveDocument in memory without going through the process of creating an intervening file? If not, is there a way I can at least stop the the SaveAs dialog from intruding into the operation. -- Ken Wilson Coding, Coding over the bounding main()

1 replies , 1/6/2005, 4:49:15 PM
Hi! Is there already a WebBrowser component (for Visual Basic .Net) to replace the one we used in VB6?? -- Bruna Fonseca

Webbrowser component
2 replies , 11/8/2005, 9:11:02 PM
I'm trying to create a custom dialog in powerpoint VBA which will act a little like the Slide Finder function where a user can scroll through thumbnails of generic slides, click on one they want, and it's inserted into their presentation. It seems that webbrowser may do the trick. Am I right to think this, and do you think I'll be able to develop such a thing with just VBA? Many thanks

Thom Moon
Why Document of Webbrowser is Nil?
0 replies , 11/7/2009, 7:46:01 AM
If my computer only has PPView97 installed(not MS Office),the Document object of Webbrowser is Nil? Why? Can anybody help me,how to get its Document object, thanks a lot! delphi code: procedure TForm1.Button1Click(Sender: TObject); begin wb.Navigate('c:\1.ppt'); //wb is a TWebbrowser if wb.Document=nil then showmessage('nil!'); end;

WebBrowser control
1 replies , 4/21/2004, 1:54:53 AM
Anybody knows what's the WebBrowser control equivalent in .NET?

webbrowser component
0 replies , 11/8/2005, 8:46:07 PM
Just a quick question. well 2 really! Firstly, I've managed to use the webbrowser component in a custom dialog in Powerpoint so show slides from a powerpoint presentation saved to htm. What I would like to do is to be able to show an actual PPT file, but which the user can click through, but when I try this, it says that there's a dialog already open, and won't show it!. the other question is, using just VBA, i'm hoping eventually to allow the user to click on what everslide they desire, and it will be inserted into their own open presentation. (much like the slide finder)... will this be possible?

Hi, I'm developing a .Net PDA application using the Microsoft .Net Compact Framework (v3.5). There is an issue when using the web browser object and navigating to a local html file (created programmatically immediately before navigation). The display displayed is blank and only when the page is refreshed (by holdin the stylus down and selecting Refresh) does the data display correctly. I originally tried to use the webbrowser.documentext method to populate the html code, but this caused random display issues (e.g. corrupt displays). I thought by creating a genuine html file first, and navigating to it would work. Note: The webbrowser object is on a panel, which is within a tab control. Anyone any ideas what's going on? See code below: Private Sub wb_Nav(ByVal sHTML As String) Dim TempFile As String = "\My Documents\MyApp\temp1.htm" Dim oSR As IO.StreamWriter If IO.File.Exists(TempFile) = True Then IO.File.Delete(TempFile) oSR = IO.File.CreateText(TempFile) oSR.WriteLine(sHTML) oSR.Dispose() oSR = Nothing wb.Navigate(New Uri("file:///my documents/myapp/temp1.htm")) End Sub Regards, Rob

Clearing "session state" of WebBrowser control
0 replies , 8/27/2009, 5:13:01 AM
Please forgive me if this is not the place to post this question, and direct me to the right place if it isn't. I have a form that cycles through a bunch of websites, some of them multiple times in a row. For each one, it opens up a second form, with a WebBrowser control on it, and navigates to the website, and automates loggin in, navigating around, etc. This works just great. However, for one of the websites, it would appear that some sort of "session state" is being remembered as when I go to login as another person, to this same site, I end up at a page that corresponds with the first person I logged in as. NOTE 1: I close the form with the WebBrowser control on it each time. NOTE 2: It doesn't always happen (i.e. inconsistent). NOTE 3: This error does not seem to happen if I do the same navigation manually, using IE browser outside of my application, closing the browser each time. So, I guess that my question is "How do I clear the 'session state' so that next time the form is opened, etc., it is not present to goof up the next login?" I tried the following code, that I partly got from, which did not work: WebBrowser1.Navigate("javascript:void((function(){var a,b,c,e,f;f=0;a=document.cookie.split('; ');for(e=0;e<a.length&&a[e];e+ +){f++;for(b='.';b;b=b.replace(/^(?:%5C.|[^%5C.]+)/,'')) {for(c=location.pathname;c;c=c.replace(/.$/,'')){document.cookie=(a[e] +'; domain='+b+'; path='+c+'; expires='+new Date((new Date()).getTime ()-1e11).toGMTString());}}}})())") Any other ideas why I might be having the problem, and how I can fix it?

Embed WebBrowser control in PowerPoint and automate it
3 replies , 10/12/2005, 7:13:31 PM
I'm trying to add a 'WebBrowser' object to a slide in PowerPoint 2002 such that it can be visible when that slide is shown, and can refresh its URL using the Navigate2 method. I started from a demo .ppt which contained a WebBrowser object. That demo also has a button on the slide which calls the WebBrowser.Navigate2 method within the button's OnClick event handler. This works, the URL loads and is displayed. But I'd like to have the browser activate and navigate based on something more automatic, like each time the slide appears, or the slideshow starts. Nothing I've tried so far works - I've tried to create a class module which includes: Public WithEvents App As Application and then I've tried writing code in App_SlideShowBegin, App_SlideShowNextSlide, etc. If I manually run the code that instantiates the Application object, I can get this to work - but only then. I've turned PowerPoint's security settings down to low. Can a VBA for PowerPoint guru suggest a way to get this to work? I would very much appreciate it. Thanks, Dave

David J Boyd
To call WebBrowser in a macro
0 replies , 3/8/2005, 6:31:54 PM
We are working on Excel code to make structured Contact records. It would be useful to open a WebBrowser window for source text I have not yet found suitable sample text for VBA and VBE under XP 2003. One way might be to invoke a New Web Query - is there any code to do that? Ross Wilcock a***********

Ross Wilcock
Why Document of Webbrowser is Nil?
1 replies , 11/7/2009, 7:45:01 AM
If my computer only has PPView97 installed(not MS Office),the Document object of Webbrowser is Nil? Why? Can anybody help me,how to get its Document object, thanks a lot! delphi code: procedure TForm1.Button1Click(Sender: TObject); begin wb.Navigate('c:\1.ppt'); //wb is a TWebbrowser if wb.Document=nil then showmessage('nil!'); end;

Access OWC embedded in WebBrowser
1 replies , 11/22/2006, 12:06:19 PM
Hello, I am using in my appliaction (.net 2.0; windows forms) WebBrowser control. I initialize WebBrowser (via DocumentText property) with following HTML: <html><body> <object id=PivotTable1 name=PivotTable1 classid=CLSID:0002E552-0000-0000-C000-000000000046> </object> </body></html> Is it possible to access PivotTable1 object from application code, so I could fully control this PivotTable object form .net code (using properties. methods an events) ? Thanks in advance. Slawek

Slawomir Zurek
webbrowser in
9 replies , 9/17/2007, 7:42:02 AM
dear support team, im using 2005 with dotnetframework 2.0, im using webbrowser control to display my word doc file , here i hv few questions? 1). how can i hide standard/drawing/ bars in webbrowser control, if i select webbrowsershortcutenabled = false, its not doing, i checked with its other property also, but its not hidding all the bars 2). and i need to set the default layout for the browser is WEB VIEW LAYOUT, and other layouts ( which is in the webbrowser down bottom), i need to hide 3). if i open the readonly recommended DOC file thru browser, still its askign for MODIFY password, if i click READONLY ( modify password is important, since the same document is sharing with other users), its opening, how can i set this readonly as default, whenever the application gets open, and is it possible for me to open the same file with different users at the same time, does it affect readonly property, advice thanks for understanding the request regards, Anis

Excel crashes when there is more than 1 webbrowser
1 replies , 12/14/2005, 10:40:30 PM
I want to use more than one webbrowser, one in every worksheet in the same workbook but Excel crashes every time I want to change to another sheet. Can someone help me? Many thanks in advance Kerne

powerpoint viewer 2007 and webbrowser
0 replies , 6/17/2008, 2:29:47 PM
Hello, I made use of the fact that powerpoint viewer could open powerpoints in a webbrowser. This was possible in powerpoint viewer 97 untill 2002. Powerpoint viewer 2003 and 2007 no longer support opening powerpoints in webbrowsers. If i install Powerpoint itself, I can open powerpoints again in a webbrowser(workaround needed in Powerpoint 2007). However i don't want to install office. Is it possible to see my powerpoint in internet explorer without conversion and without installing Office? Is there a specific reason why it has moved from the viewer to the office packet?

highlight text in webbrowser control
0 replies , 9/8/2003, 10:30:48 PM
Hi, I am trying to highlight text on the web browser control. I found an article that describes how to change font in the web browser using the execwb method. Could u tell me how I can color the selected text on the browser. Thanks, Priyanka

WebBrowser missing VBA help
0 replies , 5/27/2004, 12:39:24 AM
Office Professional 2003 Problem: WebBrowser missing VBA help When I use F1 on the WebBrowser in VBA, it says help is missing. The control works fine but I need the help for methods, etc.. Any idea what I need to install and where to find it. Thanks

Webbrowser control, when is page running?
0 replies , 5/21/2004, 4:01:10 PM
I have the webbrowser control on a form by itself. I'm going to SENDKEYS to it but I can't until the page has finished loading and is active. This page downloads in 4 discrete pieces. Each piece fires various navigation and document complete events so I'm seeing multiple instances of the same events for one page. The busy property varies between true and false during this process. The document property returns "object" almost right away. How do I know when the page is truly complete and is ready to accept data? I don't want to count the number of pieces downloaded because it could change if the page is modified. Any help? Thanks in advance. -- Scott

Event Forwarding (WebBrowser Object)
0 replies , 4/12/2004, 8:37:32 AM
The following link outlines how to attach a VBA subroutine to an event within a WebBrowser ActiveX control on a user form... url=/workshop/browser/webbrowser/tutorials/forward.asp My problem: In step 6. of "Add a Class Module to Your Project", I can't seem to the "Advanced" button on the "Procedure Attributes" dialog box in the VBA Object Browser. Is there another explanation of how to attach a sub/function to an event in the WebBrowser control?

Mark S.
PowerPoint automation in Webbrowser Control
1 replies , 8/9/2007, 2:46:12 PM
Hi, I did PowerPoint automation winthin Webbrowser Control. I can open .ppt file and browse the slides. My problem is when I have an other session of PPT open outside the Webbrowser control I losse the control of my own file. Sometimes when powerpnt process is still in the memory (caused by error in closing PowerPoint) but not PowerPont is visible, I have the same problem. Here, a source code I use to do this. //opning PPT file object messing =3D System.Reflection.Missing.Value; string filepath =3D "....." this.axWebBrowser1.Navigate(filepath, ref messing, ref messing, ref messing, ref messing); // Get the powerpoint object private void axWebBrowser1_DocumentComplete(object sender, AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e) { opDisp =3D e.pDisp; oDocument =3D opDisp.GetType().InvokeMember("Document",BindingFlags.GetProperty,null,opDi= =AD sp,null); oApplication =3D opDisp.GetType().InvokeMember("Application",BindingFlags.GetProperty,null,o= =AD Document,null); // I can't do automation from this object oApplication Object oPresentation =3D opDisp.GetType().InvokeMember("ActivePresentation",BindingFlags.GetProperty= =AD, null, oApplication, null); Object oSlides =3D opDisp.GetType().InvokeMember("Slides",BindingFlags.GetProperty, null, oPresentation, null); int slideCount =3D (int) (opDisp.GetType().InvokeMember("Count",BindingFlags.GetProperty, null, oSlides, null)); Object oSlideShowWindow =3D opDisp.GetType().InvokeMember("SlideShowWindow",BindingFlags.GetProperty, null, oPresentation, null); Object oSSWView =3D opDisp.GetType().InvokeMember("View",BindingFlags.GetProperty, null, oSlideShowWindow, null); // PowerPoint Application object PowerPoint.Application pptApplication =3D (PowerPoint.Application)oApplication; // Add Event handlers pptApplication.SlideShowNextBuild +=3Dnew PowerPoint.EApplication_SlideShowNextBuildEventHandler(pptApplication_Slide= =AD ShowNextBuild); pptApplication.SlideShowNextSlide +=3Dnew PowerPoint.EApplication_SlideShowNextSlideEventHandler(pptApplication_Slide= =AD ShowNextSlide); pptApplication.SlideShowNextClick +=3Dnew PowerPoint.EApplication_SlideShowNextClickEventHandler(pptApplication_Slide= =AD ShowNextClick); } Any help is very appreciate Samir

webBrowser control and error pages
0 replies , 8/8/2006, 8:14:10 PM
Hi, I'm using the webbrowser control to display a specific site and everyting works fine. I just want know if there is a way to tell if the requested page is acually being displayed and not some 404 or other error page, including the dnserror page when connection is down. Kind regards Oscar

WebBrowser activity on window.close
0 replies , 5/18/2006, 2:44:02 PM
I've had this problem for a while but I have just recently seen that Microsoft have added a KB article about this problem. My problem is that I program (I use the term "program" loosely - it's more like "slap stuff together") in VB.Net and I'll be the first to admit that I have no idea how to implement the workaround shown in the above KB. Can anyone provide a pointer on how to get this working in VB.Net? Thanks in advance, Will

Webbrowser Control and Keypress Event
0 replies , 11/22/2005, 7:04:02 AM
I have an application that I have created that essentially allows me to automate web page processing for my company. However, I have run into a a minor set-back that I have a temporary solution in place, but would like a better way to handle it. Currently, the user fills in information on the page and when finished pushes the "enter" key to kick off the web page processing. Just after the web page starts processing, I need to kick off several other functions that are built into the program to execute SQL queries and then write output files to their local drive. Everything works, except that I have not been able to find a way to isolate the "enter" keypress to kick off the functions. I have tried using the PreviewKeyDown Event, in which I can use SendKeys to send the "Enter" key and then process my functions, however, I do not know how to discard the original "Enter" key. I have also tried using the WH_KEYBOARD_LL hook, but for some reason, my code (which worked in VB.Net 2003) doesn't work in VB.Net 2005. I am open for any suggestions, because right now I am stumped. I am using Visual Studio Pro 2005 and the program is written in VB.Net. Thanks is advance for any help you can provide.

Who has used the IE WebBrowser Control?
0 replies , 9/23/2004, 6:13:51 PM
Who has used the IE WebBrowser Control? I'd like to know if it is possible to reuse the WebBrowser control in a page? The idea being the retrieval of your.homepage that can then be converted to an image displayed in my.homepage where my.homepage would also include other content. -- <%= Clinton Gallagher, "Twice the Results -- Half the Cost" Architectural & e-Business Consulting -- Software Development NET c********************** URL

File list view in webbrowser control
0 replies , 5/2/2011, 7:38:46 PM
Hello, I'm able to display local files using WebBrowser control in my VBA Access application, but files are always listed as big icons. I would like files to appear as a list. I've found C# and VB.NET solutions here How can it be accomplished in VBA? Thanks

Francesco Masta
WebBrowser control on Internet Explorer 7
1 replies , 9/25/2007, 3:28:03 PM
Hi... Please help me with the nex case. I have a add-in on visual basic 6 what use the WebBrowser control in a windows form. This control execute a page ini the web server what response the status whit the property window.status. This functionality is correct on Internter explorer 6 but on Internet explorer 7 generate the following error: Error 70: Denied Permission. In a computer with Windows XP Pro SP2 and Internet explorer 7, I uninstall the Internet explorer 7 and the application work correctly. Reading on Internet, the problem seems to be of the library ieframe.dll what use Internet explorer 7 and the compatibility with the WebBrowser control not is 100%. In Internet explorer 6 the library shdocvw.dll is used. As it would be the procedure so that the application works with Internet explorer 7 with no need to modify the code of the application? Thanks.

WebBrowser control in Visual Studio addin
9 replies , 9/20/2004, 12:19:40 PM
I'm trying to use Carl Nolan's HTMLEditorControl in a Visual Studio .NET 2003 addin. The control works great in a stand-alone app, but when I put it into a form in my addin, an "Unknown error" exception is thrown at the line ((System.ComponentModel.ISupportInitialize)(this.editorWebBrowser)).EndInit(); I don't have any ideas how to debug this or figure out what it wrong. I'm guessing it has something to do with hosting the web browser control in the addin environment. Any ideas? ....Mike

Mike Kraley
Use of the WebBrowser control - Access 2003
0 replies , 1/26/2007, 6:01:02 PM
I am trying to use the WebBrowser control to automate a job task which requires me to log in to a specific website, enter a date range into 2 textboxes, hit a button to see if there is any data posted for that date range, and finally download any data that is posted. I use the Navigate method of the WebBrowser control and it navigates to the web site ok. However, once I have the page displayed in the control, I have no idea how to fill the textboxes with the date range and then how to click the button. Also, how do I find out what the names of the elements on that page are? Do I need to know their names in order to use them. If anyone here knows the answers to these questions, please enlighten me. Thanks

Access traps Enterkey on WebBrowser control
0 replies , 9/13/2003, 6:51:29 AM
Access traps the Enter key when I use a WebBrowser control on a form. The click on the web form button to submit it work, but Enter key is ignored. Tab works, Ctrl-N works to open a new Windw, but not the Enter Key. Anybody had this?, and how can I fix it? Thanks Gerhard

Gerhard Pretorius
WebBrowser control on Internet Explorer 7
0 replies , 9/25/2007, 3:42:02 PM
Hi... Please help me with the nex case. I have a add-in on visual basic 6 what use the WebBrowser control in a windows form. This control execute a page ini the web server what response the status whit the property window.status. This functionality is correct on Internter explorer 6 but on Internet explorer 7 generate the following error: Error 70: Denied Permission. In a computer with Windows XP Pro SP2 and Internet explorer 7, I uninstall the Internet explorer 7 and the application work correctly. Reading on Internet, the problem seems to be of the library ieframe.dll what use Internet explorer 7 and the compatibility with the WebBrowser control not is 100%. In Internet explorer 6 the library shdocvw.dll is used. As it would be the procedure so that the application works with Internet explorer 7 with no need to modify the code of the application? Thanks.