Results 1 to 4 of 4

Thread: Word Automation/Web Browser Control

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2010
    Posts
    2

    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!

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2010
    Posts
    2

    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.

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    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
  •  



Click Here to Expand Forum to Full Width