11-05-2007 11:45 AM
11-05-2007 12:42 PM
Yes, we did indeed just stay below the problematic number of bitmaps.
However, it was not a clear-cut, repeatable thing, and if I recall correctly was really hard to document across different versions of Word and Windows, especially with different behavior exhibited after a fresh reboot. (I think it was in the era of Word 97 on Win 98 and Word 2002 on XP). We tried all sorts tricks like saving, Delay(), Process____Events() etc. but without success.
Pasting 20 bitmaps (say ~600 x 600) into a single document would have been over our limit for sure. We kept the bitmaps under 5 or maybe 8, and with text the report would have been 25-40 pages in total.
After walking away from that issue, we did see one other similar problem when dumping large numbers of bitmaps (20-40 screenshots) to PowerPoint 2002 via ActiveX: If left open after the creating and pasting, the instance of PowerPoint would occasionally just randomly close some time later, perhaps 3 minutes later. Everything was properly cleaned up and closed when our app was done pasting, but there seemed to be an over eager garbage collector lurking in the system. The workaround was to save, close, and re-open the ppt for further editing.
All this has left me rather leery about pasting bitmaps to Office apps.
11-05-2007 01:27 PM
11-05-2007 01:57 PM - edited 11-05-2007 01:58 PM
11-05-2007 02:23 PM
Thanks for the interest.
I am curious if this function:
CVI_AppSetBreakOnFirstChanceExceptions (CAObjHandle objectHandle, ERRORINFO *errorInfo, long enabled, long *returnValue);
is intended to catch exceptions of the type we're seeing?
11-05-2007 02:37 PM
11-07-2007 10:02 PM
I'm curious if maybe we're filling up the Office Clipboard (a separate item from the Windows Clipboard). It can hold 8MB of stuff and I also see a Microsoft KB item for at least one version of Word that fails to warn when the Office Clipboard fills.
We're using WordRpt_InsertScaledImage () to insert a bitmap that's been created using the CVI function:
SavePanelDisplayToFile ()
Is the bitmap winding up on the "Office" clipboard by any chance? Is it on the "Windows" clipboard?
Thanks.
Menchar
11-09-2007 03:17 PM - edited 11-09-2007 03:18 PM
11-13-2007 09:13 AM
menchar,
That Office clipboard theory seems quite plausible. On occasion in the past I have seen paste operations that unexpectedly resulted in an Adobe Acrobat icon being pased into a Word doc rather than text or an image. IIRC, it happened after a second run of the app that was doing the pasting. That was with XP and Office XP(2002). Perhaps this is related to your "pathname in place of text" issue.
I don't think I've seen any of this kind of pasting issue in Vista/Office 2007- which is my main platform now - but I have not purposefully pushed the limits.
Please keep us posted of any breakthroughs - or requests to test something.
--Ian