Results 1 to 3 of 3

Thread: [2005] Problems with Word automation

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    [2005] Problems with Word automation

    I have written some simple code to open a word or .doc file in word 2003.
    It works fine but when I copy my application over to another machine which has 2003 installed on it and run it nothing happens.
    Its strange as I have try catch blocks around almost everything but there are no exceptions being thrown.

    When I try to open my doc file the hourglass appears ......then nothing.

    Any ideas folks.
    I wrote this code ages ago and can't even remember what references where made

    Parksie

  2. #2
    Member
    Join Date
    Nov 2006
    Posts
    37

    Re: [2005] Problems with Word automation

    is the path you use to locate Word the same on both machines? My guess is that they have Word installed on different location...

  3. #3

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    Red face Re: [2005] Problems with Word automation

    There both in the same place but I don't really think that should matter. Here is the code I am using :
    Code:
    Microsoft.Office.Interop.Word.Application oWord = new Microsoft.Office.Interop.Word.Application();
    Microsoft.Office.Interop.Word.Document oWordDoc = new   Microsoft.Office.Interop.Word.Document();
    //Make word visible
    oWord.Visible = true;
     //Add document object to the word objects document collection
    oWordDoc = oWord.Documents.Open(ref oFilename,ref oMissing, ref oTrue, ref oFalse, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);

    Parksie

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