+ Reply to Thread
Results 1 to 3 of 3

Does library reference stay with the code?

  1. #1
    Registered User
    Join Date
    06-07-2006
    Posts
    1

    Does library reference stay with the code?

    In order to manipulate Word files from Excel the Word object library must be enabled using the Tools menu in the VB Editor. After doing this my code works correctly. But will the Excel file still operate correctly on another machine - will the Word object library have to be manually enabled on every machine that uses the file?

  2. #2
    Ardus Petus
    Guest

    Re: Does library reference stay with the code?

    Yes, references are stored within the workbook.

    HTH
    --
    AP

    "Peter Cornish" <[email protected]>
    a écrit dans le message de news:
    Peter.Cornish.291d3n_1149690330.6381...rum-nospam.com...
    >
    > In order to manipulate Word files from Excel the Word object library
    > must be enabled using the Tools menu in the VB Editor. After doing
    > this my code works correctly. But will the Excel file still operate
    > correctly on another machine - will the Word object library have to be
    > manually enabled on every machine that uses the file?
    >
    >
    > --
    > Peter Cornish
    > ------------------------------------------------------------------------
    > Peter Cornish's Profile:
    > http://www.excelforum.com/member.php...o&userid=35183
    > View this thread: http://www.excelforum.com/showthread...hreadid=549490
    >




  3. #3
    Jim Thomlinson
    Guest

    RE: Does library reference stay with the code?

    There can be a bit of an issue with the Word library in that it is dependant
    on the version of Word. If you reference a version of word that the target
    system is not using then you will come back with a missing reference. You can
    get around that by not referencing the Word library and doing something like
    this...

    dim wrdApp as object

    set wrdApp = createobject("Word.Application")

    The only thing to note here is that since you have not made a direct
    reference to the Word library intellisense will not work as you are creating
    the code. Since I like having the intellisence I usually add the reference
    while I am developing the code and then remove the reference at the end and
    add the above code...
    --
    HTH...

    Jim Thomlinson


    "Peter Cornish" wrote:

    >
    > In order to manipulate Word files from Excel the Word object library
    > must be enabled using the Tools menu in the VB Editor. After doing
    > this my code works correctly. But will the Excel file still operate
    > correctly on another machine - will the Word object library have to be
    > manually enabled on every machine that uses the file?
    >
    >
    > --
    > Peter Cornish
    > ------------------------------------------------------------------------
    > Peter Cornish's Profile: http://www.excelforum.com/member.php...o&userid=35183
    > View this thread: http://www.excelforum.com/showthread...hreadid=549490
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1