I
Indian Ocean
Hi,
I am working on a application developed on top of DSOFramer 1.3.
I want to compare the currently loaded document within DSOFramer with
another one located in file system.
This functionality works fine but fails (no proper exception info I could
get) with Word 2007 (whether it's DOC or DOCX format).
The following code I am using:
MSWORD2007::_DocumentPtr doc2007 = doc;
_variant_t vtTarget((long)MSWORD2007::wdCompareTargetCurrent, VT_I4);
_variant_t vtTrue(true);
hr = doc2007->Compare(sFileToCompare, &vtMissing, &vtTarget,
&vtMissing, &vtTrue, &vtMissing, &vtMissing, &vtMissing);
I have also tried raw_Compare method but no success.
The similar code for Office 2003 is there which works fine when I have a
Word 2003 on client machine.
Code for Office 2003:
MSWORD2003::_DocumentPtr doc2003 = doc;
_variant_t vtTarget((long)MSWORD2003::wdCompareTargetCurrent, VT_I4);
_variant_t vtTrue(true);
hr = doc2003->Compare(sFileToCompare, &vtMissing, &vtTarget,
&vtMissing, &vtTrue);
Please help me understand whether document level compare is working or not
in Word 2007 in embedded mode? What i need to change to make it working in
above 2007 related code?
Thanks in Advance,
I am working on a application developed on top of DSOFramer 1.3.
I want to compare the currently loaded document within DSOFramer with
another one located in file system.
This functionality works fine but fails (no proper exception info I could
get) with Word 2007 (whether it's DOC or DOCX format).
The following code I am using:
MSWORD2007::_DocumentPtr doc2007 = doc;
_variant_t vtTarget((long)MSWORD2007::wdCompareTargetCurrent, VT_I4);
_variant_t vtTrue(true);
hr = doc2007->Compare(sFileToCompare, &vtMissing, &vtTarget,
&vtMissing, &vtTrue, &vtMissing, &vtMissing, &vtMissing);
I have also tried raw_Compare method but no success.
The similar code for Office 2003 is there which works fine when I have a
Word 2003 on client machine.
Code for Office 2003:
MSWORD2003::_DocumentPtr doc2003 = doc;
_variant_t vtTarget((long)MSWORD2003::wdCompareTargetCurrent, VT_I4);
_variant_t vtTrue(true);
hr = doc2003->Compare(sFileToCompare, &vtMissing, &vtTarget,
&vtMissing, &vtTrue);
Please help me understand whether document level compare is working or not
in Word 2007 in embedded mode? What i need to change to make it working in
above 2007 related code?
Thanks in Advance,