|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Viewing Word Docs in Tabssilly as may my questions. Here is what i would like to do. I would like to open potentially multiple word documents for viewing only in a tab control. Each Word document should open in its own tab. Sometimes there may be only 1 document to open, sometimes there may be 5. I have gotten my app to create the necessary tabs but I can't get more than one word document to open utilizing the Web Browser object. I am using an arraylist to store the documents i need to open. If multiple exist it will open the first one in the first tab, but errors out stating "Exception of type InvalidActiveXStateException was thrown." when trying to open the second word doc in the secon tab. Any suggestions on if this is possible or another way of doing it? Here is my code: Try Dim i As Integer = 0 Dim tbTestTab As TabPage Do While i < aryTest.Count tbTestTab = New TabPage TabControl1.Controls.Add(tbTestTab) tbTestTab.Name = "tbTab" & i tbTestTab.Text = "Tab " & i Dim browser As New AxSHDocVw.AxWebBrowser browser.Size = New System.Drawing.Size(400, 350) tbTestTab.Controls.Add(browser) browser.Navigate2(aryTest(i)) i = i + 1 Loop Catch ex As Exception MessageBox.Show(ex.Message) End Try Thanks for the assistance and please let me know if there is something i should be doing differently as this stuff is new to me. Thanks. Aolson,
Not that I have the answer (I never used a worddocument in the webbrowser), but because that you are using version 2003 code and tell that you are new. Are you using version 2003 or version 2005? Cor Aolson,
Did you try this already with the designer. Because of the RESX does it give in my expirience other results than in code. (In this case it is not a control it is only an interop to an internal webbrowser) I mean creating the tabpages and than dragging them upon that one by one. I am not the only one who had in this case better expiriences with the designer. I hope this helps, Cor Unfortunately I can't do it this way as sometimes I will have 4 word
docs to open and other times it may only be one. This being the case i need to programmatically generate the tabs and the browser control don't i? > Unfortunately I can't do it this way as sometimes I will have 4 word Why?> docs to open and other times it may only be one. This being the case i > need to programmatically generate the tabs and the browser control > don't i? Cor
Re: Store multi-choice groupbox selection in a field
Form size ??? Do properties return byref or byval? select text in textbox DataGridView DataBinding PERFORMANCE QUESTION .vbprog not installed! VB 2005 - URGENT Check Mapped Drive is Connected Serilization of custom object Operators do not work in VB.NET with a C# referenced assembly |
|||||||||||||||||||||||