Ethen_hunt
asked on
Open .Doc File in vb6 textbox or rich textbox with formating....
Here is the thing
I want to do the fellowing.
open a word doc file with formating or an html page with formating into a text box or rich text box
and then create a flash file based on the text given that is like a flash book
is should be able to output a swf and a exe.
this is my goal i can handle the flash part but i need help in the programming.
please try to avoid activex controls or other types and don't want those word.open app thing
keep the depedencies to a minimum please thx alot
I want to do the fellowing.
open a word doc file with formating or an html page with formating into a text box or rich text box
and then create a flash file based on the text given that is like a flash book
is should be able to output a swf and a exe.
this is my goal i can handle the flash part but i need help in the programming.
please try to avoid activex controls or other types and don't want those word.open app thing
keep the depedencies to a minimum please thx alot
ASKER
well that opens the word application or ask me to save the file
i want to open it in a text box m8
thx for your reply tho.
i want to open it in a text box m8
thx for your reply tho.
You can use the RichTextBox control to do it for .RTF files -- RichTextBox1.LoadFile "file.rtf" -- but I don't think it will work for .doc files...
I think bingie's got the best option -- the Open/Save dialogue you get is a security setting that you may be able to turn off...
J.
I think bingie's got the best option -- the Open/Save dialogue you get is a security setting that you may be able to turn off...
J.
And if you want any kind of Word functionality, without using the Word object, I think you'll need a spare $1300 (ish) for the tools at Aspose (http://www.aspose.net)
J.
J.
Either that, or you'll need to parse the entire file format yourself...
J.
J.
I have yet to find a better solution then using the webbrowser component, since the rtb doesn't really work for this - it somtimes messes up the formatting since a word doc is compleatly different from a .txt or .rtf.
Why are you opposed to that?
Why are you opposed to that?
ASKER
well i am not i need to get the text with the formating intact so i can change few things and process it. if you can provide any code that will disable the security thing for a temp time i might go that way then. :D
>> if you can provide any code that will disable the security thing for a temp time
OK, the theory is:
On file load:
(1.) Scan the HKEY_CLASSES_ROOT registry branch for the '.doc' subbranch
(2.) Determine the associated class from the '(default)' key
(3.) Scan the HKCR branch again, for the associated class' subbranch
(4.) Modify the 'EditFlags' key so that the third flag is 01, not 00
(5.) Navigate to the .doc file in the Webbrowser control
(6.) Modify the 'EditFlags' key so that the third flag is whatever it was before.
When I've written and tested it, I post it here...
J.
OK, the theory is:
On file load:
(1.) Scan the HKEY_CLASSES_ROOT registry branch for the '.doc' subbranch
(2.) Determine the associated class from the '(default)' key
(3.) Scan the HKCR branch again, for the associated class' subbranch
(4.) Modify the 'EditFlags' key so that the third flag is 01, not 00
(5.) Navigate to the .doc file in the Webbrowser control
(6.) Modify the 'EditFlags' key so that the third flag is whatever it was before.
When I've written and tested it, I post it here...
J.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If that doesn't work then you're going to need to use the Word object...
J.
J.
ASKER
well thx alot for the help but i can't use a 3rd party code :(
i am haveing a problem in one thing and if you help me i will give you the full points.
i have a word doc in which i want to take a name form the access database and put in a position and then from vb6 give a print command after displaying the printing dialog box
basicly i want a front sheet to be printed if you know what i mean if not reply and i will try my best. :D
thx once again.
i am haveing a problem in one thing and if you help me i will give you the full points.
i have a word doc in which i want to take a name form the access database and put in a position and then from vb6 give a print command after displaying the printing dialog box
basicly i want a front sheet to be printed if you know what i mean if not reply and i will try my best. :D
thx once again.
Thanks for the points. Why no third party code? It's just a .bas file that you drop in to your app. You don't have to install it, or anything. If third-party code is really a problem, do a Google search for the API required to read/write registry values, then replicate it.
As for your front sheet, how about creating a page at the beginning of the document, with some form fields, then using Mail Merge or ADO to populate them...
J.
As for your front sheet, how about creating a page at the beginning of the document, with some form fields, then using Mail Merge or ADO to populate them...
J.
ASKER
you mean a form in MS word ? and if that is possible can i print the form directly from vb?
Webbrowser1.Navigate2 "c:\myDoc.doc" or for the webpage
Webbrowser1.navigate2 "www.yourwebpage.com"