Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. Word Automation working but doing something VERY STRANGE when opening file???

Word Automation working but doing something VERY STRANGE when opening file???

Scheduled Pinned Locked Moved COM
testingtoolshelptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Al_Pennyworth
    wrote on last edited by
    #1

    Hi all, I finally was able to get my Word Automation project to work, somewhat. I was never able to find a way with Office 97 but Office 2000 and XP, I was able to find a way. But I am having one problem. When I launch Word from my application, everything seems to work fine. Except when I decide to open an existing word document. It opens the document but it does it in an entirely new Word window, not in the existing window like it usually does. Any ideas what might be causing this? Any ideas how to get around this?????? I am stumped...

    T 1 Reply Last reply
    0
    • A Al_Pennyworth

      Hi all, I finally was able to get my Word Automation project to work, somewhat. I was never able to find a way with Office 97 but Office 2000 and XP, I was able to find a way. But I am having one problem. When I launch Word from my application, everything seems to work fine. Except when I decide to open an existing word document. It opens the document but it does it in an entirely new Word window, not in the existing window like it usually does. Any ideas what might be causing this? Any ideas how to get around this?????? I am stumped...

      T Offline
      T Offline
      Tym
      wrote on last edited by
      #2

      Hi, this is an uninformed, inexperienced answer, but maybe it will help. Have you tried checking for an existing instance of word before opening the doc? I am brand new to COM, but it seems like there should be a way to check for this and then open a communication to the existing instance. I don't know what your code is like, but if you're just using system calls or something to open the doc and leave it up to windows file associations to do the right thing, that might be the problem. Sorry if this is of no help, but no one else had an opinion... tym!

      A 1 Reply Last reply
      0
      • T Tym

        Hi, this is an uninformed, inexperienced answer, but maybe it will help. Have you tried checking for an existing instance of word before opening the doc? I am brand new to COM, but it seems like there should be a way to check for this and then open a communication to the existing instance. I don't know what your code is like, but if you're just using system calls or something to open the doc and leave it up to windows file associations to do the right thing, that might be the problem. Sorry if this is of no help, but no one else had an opinion... tym!

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        If you used the Amit Dey article, I have had this problem as well. And I have not come up with a way to check for an existing instance, since it uses ATL...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups