I have a problem. I do print the document, but before I install the correct printer. After calling the function PrintOut. Then return the previous one and then I have crash application (crashed Word 2013 application). This code works fine in other versions Word, but here in Word 2013 does not perceive. Help me understand why this happens. Why cann't I return the previous printer? All thanks!
_bstr_t prevActivePrinter = m_WordAppPtr->ActivePrinter;
m_WordAppPtr->ActivePrinter = "My Printer";
m_WordAppPtr->PrintOut();
m_WordAppPtr->ActivePrinter = prevActivePrinter;