//And grab any text and formatting and generate appropriate xml\r
bool firstLoop=true;\r
do {\r
- //Try moving\r
- //But if characterFormatting doesn't work, and word doesn't work, or no units were moved then break out of the loop\r
- if((\r
- ((formatConfig&formatConfig_reportSpellingErrors)||(_com_dispatch_raw_method(pDispatchRange,wdDISPID_RANGE_MOVEEND,DISPATCH_METHOD,VT_I4,&unitsMoved,L"\x0003\x0003",wdCharacterFormatting,1)!=S_OK))&&\r
- _com_dispatch_raw_method(pDispatchRange,wdDISPID_RANGE_MOVEEND,DISPATCH_METHOD,VT_I4,&unitsMoved,L"\x0003\x0003",wdWord,1)!=S_OK\r
- )||unitsMoved<=0) {\r
+ //Move the end by word\r
+ if(_com_dispatch_raw_method(pDispatchRange,wdDISPID_RANGE_MOVEEND,DISPATCH_METHOD,VT_I4,&unitsMoved,L"\x0003\x0003",wdWord,1)!=S_OK||unitsMoved<=0) {\r
break;\r
}\r
_com_dispatch_raw_propget(pDispatchRange,wdDISPID_RANGE_END,VT_I4,&chunkEndOffset);\r