+ Reply to Thread
Results 1 to 3 of 3

Trouble running macro for Word.Application

  1. #1
    Registered User
    Join Date
    11-08-2012
    Location
    Copenhagen
    MS-Off Ver
    Excel 2007
    Posts
    56

    Trouble running macro for Word.Application

    Hi Guys

    I get an error each time I try to execute the following code. It is a Compile Error: User-defined type not defined.
    This is the only module within this workbook.

    Please Login or Register  to view this content.
    What am I doing wrong?

    Best regards
    Danny

  2. #2
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Trouble running macro for Word.Application

    Danny,

    you are using a technique that is called early-binding as is evidenced for example by the statement

    Please Login or Register  to view this content.
    If you are getting the message "User defined type..." that probably means that you have not set the reference to the Microsoft Word Object library. Go to Tools/Preferences and select the correct library.
    If you like my contribution click the star icon!

  3. #3
    Registered User
    Join Date
    11-08-2012
    Location
    Copenhagen
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Trouble running macro for Word.Application

    Ah of course.. Thanks for the fast reply..

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. trouble running a macro that refers to the range using a formula
    By lukensaputra in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2013, 05:13 AM
  2. Trouble hiding page breaks after running macro
    By Einstahb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2011, 10:40 PM
  3. Trouble Running IF Statement while recording Macro
    By MacroNovice in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-16-2011, 03:40 PM
  4. Running macro-powered application
    By MichielM in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-04-2011, 05:09 AM
  5. Excel VBA Macro Running DOS Application !!
    By monir in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-25-2006, 11:00 PM

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