Click here to Skip to main content
15,921,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Scroll bars in an Explorer Bar? Pin
mahesh1-Jun-00 4:22
mahesh1-Jun-00 4:22 
GeneralCFileDialog does not open Pin
Member 135631-May-00 2:42
Member 135631-May-00 2:42 
GeneralRe: CFileDialog does not open Pin
Brigg Thorp1-Jun-00 1:45
Brigg Thorp1-Jun-00 1:45 
GeneralRe: CFileDialog does not open Pin
Blake Miller4-Jun-00 15:08
Blake Miller4-Jun-00 15:08 
GeneralRe: CFileDialog does not open Pin
Member 13564-Jun-00 23:59
Member 13564-Jun-00 23:59 
GeneralRe: CFileDialog does not open Pin
Member 13565-Jun-00 0:13
Member 13565-Jun-00 0:13 
GeneralATL com Web Browser Component Pin
Aruna Reddy30-May-00 19:12
Aruna Reddy30-May-00 19:12 
GeneralFind Replace Problem MSWord 200 from C++ Pin
Neil Katalino30-May-00 17:12
Neil Katalino30-May-00 17:12 
There have been numerous postings about controlling MSWord from C++. I am trying to do global Find and Replace on a document. The following code only does replace in the document body, bypassing headers and footers. When I do Find/Replace from Word interface, everything gets replaced including headers and footers. So my goal is to make the following code do replace in the entire document including headers and footers.

Any feedback will be greatly appreciated.



if (!m_oWord.CreateDispatch("Word.Application"))
{
return FALSE;
}
// Set the visible property
m_oWord.SetVisible(TRUE);
m_oDocs = m_oWord.GetDocuments();
m_oDoc = m_oDocs.Open(COleVariant(m_strTemplateFile), vtOptional,vtOptional,vtOptional,vtOptional, vtOptional,vtOptional,vtOptional,vtOptional, vtOptional, vtOptional, vtOptional);
m_oSelection = m_oWord.GetSelection();
m_oFind = m_oSelection.GetFind(); m_oFind.ClearFormatting();
m_oReplacement = m_oFind.GetReplacement(); m_oReplacement.ClearFormatting();
.
.
.

{
COleVariant vtText("Field1"); COleVariant vtTextReplacement("Joe Blow"); m_oFind.Execute(vtText, vtFalse, vtFalse, vtFalse, vtFalse, vtFalse, vtTrue, vtwdFindContinue, vtFalse, vtTextReplacement, vtwdReplaceAll, vtFalse, vtFalse, vtFalse, vtFalse);
}







GeneralFind Replace Problem MSWord 200 from C++ Pin
Neil Katalino30-May-00 17:09
Neil Katalino30-May-00 17:09 
QuestionToolbar-like Framework? Pin
Sid Price30-May-00 11:43
Sid Price30-May-00 11:43 
AnswerRe: Toolbar-like Framework? Pin
Dmitriy31-May-00 4:56
Dmitriy31-May-00 4:56 
Generalupdateresource question Pin
drkar30-May-00 11:09
drkar30-May-00 11:09 
GeneralRe: updateresource question Pin
Paolo Messina30-May-00 11:36
professionalPaolo Messina30-May-00 11:36 
GeneralRe: updateresource question Pin
Dmitriy31-May-00 4:54
Dmitriy31-May-00 4:54 
GeneralRe: updateresource question Pin
Blake Miller9-Jun-00 21:58
Blake Miller9-Jun-00 21:58 
GeneralRe: updateresource question Pin
Blake Miller5-Jun-00 4:40
Blake Miller5-Jun-00 4:40 
Generalc++ Pin
Jeff Szielenski30-May-00 10:02
Jeff Szielenski30-May-00 10:02 
GeneralRe: c++ Pin
Brigg Thorp1-Jun-00 1:51
Brigg Thorp1-Jun-00 1:51 
GeneralRe: c++ Pin
Member 14741-Jun-00 9:31
Member 14741-Jun-00 9:31 
GeneralRe: c++ Pin
Brigg Thorp2-Jun-00 1:19
Brigg Thorp2-Jun-00 1:19 
GeneralRe: c++ Pin
Member 7505-Jun-00 18:12
Member 7505-Jun-00 18:12 
GeneralFirst-chance exception Pin
nickinchina30-May-00 9:56
nickinchina30-May-00 9:56 
GeneralRe: First-chance exception Pin
Tim Deveaux30-May-00 13:04
Tim Deveaux30-May-00 13:04 
GeneralRe: First-chance exception Pin
Arvind2330-May-00 13:53
Arvind2330-May-00 13:53 
GeneralAccess Violation Pin
Adam Clauss30-May-00 5:58
Adam Clauss30-May-00 5:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.