|
-
Aug 11th, 2010, 10:33 AM
#1
Thread Starter
New Member
Word Automation/Web Browser Control
Hi. I am having strange problems with opening Word documents while using the Web Browser control in my vb6 app. I use appwd.WordBasic.fileopen docname to open Word documents. The document should open in Word but instead I get the Internet Explorer Open dialog - "Type the Internet address of a document, and Internet Explorer will open it for you". The only thing I can think of is that I have a Web Browser control on one of my screens with a document open inside it and that this is interfering somehow. I want to use a mix of opening letters inside the Web Browser and opening in Word. Please help!
-
Aug 11th, 2010, 04:27 PM
#2
Re: Word Automation/Web Browser Control
unless you are using word 95 or older i would suggest avoiding the use of wordbasic, change to vba
set doc = appwd.documents.open(docname)
this may not resolve your current issue, would need to see more of your code, can you post a sample form that demonstrates this problem
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Aug 12th, 2010, 04:00 AM
#3
Thread Starter
New Member
Re: Word Automation/Web Browser Control
I tried using set doc = appwd.documents.open(docname) but still got the Internet Explorer Open dialog popping up. I can't really send a sample form as it is a large complex project. Does anyone know why IE Open dialog would be invoked when opening a Word doc? I am assuming my Web Browser control has hijacked my instance of Word somehow.
-
Aug 12th, 2010, 04:24 AM
#4
Re: Word Automation/Web Browser Control
I can't really send a sample form as it is a large complex project.
that is why i asked for a sample form, not one from your project
create a new project, add webbrower to form, test to see what happens when opening word document, in similar code
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|