+ Reply to Thread
Results 1 to 3 of 3

Printing OLEObject from Excel

  1. #1
    Registered User
    Join Date
    04-08-2010
    Location
    London, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    1

    Printing OLEObject from Excel

    Hi All,

    I'm trying to insert some code into my worksheet to print a word document that is embedded (not linked, there are no file paths) in the worksheet. I have it working right now using this code:
    Please Login or Register  to view this content.
    The problem is that I get multiple WINWORD.EXE instances running even though I have WordApp.Quit and Set WordApp = Nothing lines of code further down as well. Does anyone know why this is happening or if there is a more efficient way to print an embedded Word document from Excel? This is the first time I've ever customized Excel, usually I work in ArcMap. The documents are embedded, not linked, for the same reason I have to write this code in the first place; the people using the workbook are not computer friendly so we're trying to automate things from simple buttons and forms as much as possible.

    Thanks in advance for the help!
    Last edited by Leith Ross; 04-08-2010 at 01:07 PM. Reason: Added Code Tags

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Printing OLEObject from Excel

    Hello GISgirl,

    Welcome to the Forum!

    There are some rules you need to be aware of when you post.
    1. Your thread title should clearly describe your problem or question.
    2. To make the code easier to read and copy, format it with Code Tags.

    Because you are new, I have wrapped the code for you.

    As a new member, please take some time to familiarize yourself with the rules.
    Forum Rules
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Printing OLEObject from Excel

    Hello GISgirl,

    You have multiple instances of Word because you are quitting the application. Closing the document does not close Word itself, only the open document. Here is the corrected code...
    Please Login or Register  to view this content.

+ 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