Selection s=app.GetSelection(); //save documents to word CTextDoc* pDoc = ((CTextView*)this->GetActiveView())->GetDocument(); s.TypeText(pDoc->m_text);