+ Reply to Thread
Results 1 to 9 of 9

I am trying to print a word document from a Excel spreadsheet.

  1. #1
    Forum Contributor
    Join Date
    05-30-2013
    Location
    Isreal
    MS-Off Ver
    Excel 2010
    Posts
    191

    I am trying to print a word document from a Excel spreadsheet.

    I am trying to print a word document from a Excel spreadsheet.
    However I get an error “that object is not support this property or method”

    I am not sure why I’m getting this error.
    Here is the code I am using
    HTML Code: 
    Any help will be welcome

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: I am trying to print a word document from a Excel spreadsheet.

    Not sure where the problem lies... I can see that you have "WordDoc.Print*Out" which needs to have the * removed... : "WordDoc.PrintOut"
    Other than that, it needs to have something in the clipboard to paste, otherwise you would get an error, but a different one.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: I am trying to print a word document from a Excel spreadsheet.

    Also note that after you fix the problem pointed out by Arkadi, I think you will get problem because of using enumerated constant wdDoNotSaveChanges. You are using late binding so word vba object model and its member are not exposed (i.e. wdDoNotSaveChanges is unknown to Excel). Use respective number instead.

    EDIT: as per following post, I was wrong.
    Last edited by buran; 05-20-2015 at 08:41 AM.
    If you are pleased with a member's answer then use the Star icon to rate it.

  4. #4
    Forum Contributor
    Join Date
    05-30-2013
    Location
    Isreal
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: I am trying to print a word document from a Excel spreadsheet.

    That seemed to work.
    wdDoNotSaveChanges seems to work as well

    Thank you

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: I am trying to print a word document from a Excel spreadsheet.

    As buran mentioned, it could cause an issue, does not on my machine, but it all depends on the references included. so if that line is a problem the constant should be 0... :
    Please Login or Register  to view this content.

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: I am trying to print a word document from a Excel spreadsheet.

    Glad we could help

    Please remember to mark the thread as solved.

  7. #7
    Forum Contributor
    Join Date
    05-30-2013
    Location
    Isreal
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: I am trying to print a word document from a Excel spreadsheet.

    How can i mark as solved?

  8. #8
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: I am trying to print a word document from a Excel spreadsheet.

    near the top, on the right, there is a "Thread Tools" menu option, you can use that to mark it as solved

  9. #9
    Forum Contributor
    Join Date
    05-30-2013
    Location
    Isreal
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: I am trying to print a word document from a Excel spreadsheet.

    Did it thank you

+ 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. With excel to print a selected page from a word document
    By eb4927 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-15-2014, 05:54 PM
  2. Print off the word document using excel vba code
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-17-2013, 09:42 AM
  3. Replies: 1
    Last Post: 05-28-2006, 12:45 PM
  4. [SOLVED] Changing a word document into an excel spreadsheet
    By aganchingco in forum Excel General
    Replies: 3
    Last Post: 01-04-2006, 08:14 PM
  5. Replies: 0
    Last Post: 07-10-2005, 05:30 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