Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Showing a Word document within a form

Status
Not open for further replies.

SteveShanks

Programmer
Nov 28, 2001
112
GB
Hi all

I'm looking to create a Word document with text and pictures as a basic online help for my app. basically pop the document up in a form within the app.

Does anyone have any suggestions on how I could accomplish this allowing for the fact that the user may not have a copy of Word on their machine.

Was thinking about saving the document in HTML or something and then is there a control I could use to display it?

many thanks
Steve
 
Can anyone give me some pointers on which control would be best. I'm not familiar with anything suitable on the .NET or COM side.

Thanks
Steve
 
I'm running VB.NET 2003 (v7.1.3088) on Framework v1.1

Cheers
Steve
 
Then you need the com object named axwebcontrol. It's actually ieexplorer and your setup project will tell you that it's protected and some other blah-blah but it works and never mind the warnings.

The com object can then be added to your form and you can navigate to your page of preference using the navigate function of the control.

you can find plenty of examples on this forum or on google.


Christiaan Baes
Belgium

"My new site" - Me
 
I think i have lost my mind.... but i thought i saw a tool that would build .chm files, I think that may be hard to write, but would look very professional....

did a quick help serch on ver2003 and found a help provider namespace.

worth a quick look i think.

have fun:)



if it is to be it's up to me
 
there are plenty of chm builder things out there. But who needs help files. A good program should be easy enough so any id10t can use it.

Don't forget sarcasm.

Christiaan Baes
Belgium

"My new site" - Me
 
HI

I have included the axWebBrowser on my form but get several errors when it hits this line 'CType(Me.WebBrowser, System.ComponentModel.ISupportInitialize).EndInit()' in the InitializeComponet section.

the error I get 4 times is:
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in system.windows.forms.dll

Additional information: Unknown error

and then I get the same error 3 more times on the .Navigate call

If I continue through them then eventually the .navigate method executes and I see my HTML page in the control.

How do I get around these errors?

Thanks
Steve
 
Quick update,

I have rebuilt the project and I don't get these errors if I run the .exe directly, only when in development

Any thoughts

Thanks
Steve
 
Hey Steve,
Don't know if you ever figured this out, but I had the exact same error under the same circumstances (only when in dev, not if I ran the EXE directly). Turned out that creating a new solution fixed it for me. I had two versions of a project - an older one that didn't get this error and a newer one that did. Hoping to find the culprit, I spent hours trying to incrementally change the old project to match the new one. In the end, I had two identical projects. The code, assemblies referenced, csproj files, EVERTYTHING was identical (except for the compiled executable of course)... Same thing - old one worked, new one didn't. The only thing remaining that was different was the sln file. I created a new solution, added my project to it, and voila - it worked again. Wish I'd tried it about 4 hours ago!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top