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
Any help will be welcomeHTML Code:
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
Any help will be welcomeHTML Code:
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.
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.
That seemed to work.
wdDoNotSaveChanges seems to work as well
Thank you
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.
Glad we could help
Please remember to mark the thread as solved.
How can i mark as solved?
near the top, on the right, there is a "Thread Tools" menu option, you can use that to mark it as solved![]()
Did it thank you
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks