Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help! Excel pastes in "shape" format

I am debugging a huge application (which, among others, integrates in Excel
and other Office products) for a bug in which Copy-Paste doesn't work as
expected.

Here's what the application does:
- Added its window to the chain of clipboard viewers
- On "Copy" (when it receives WM_DRAWCLIPBOARD), it passes control to a
COleDataSource-derived class, which then retrieves a data object from the
Clipboard through OleGetClipboard(), and then iterates through the formats
supported by the data object.
- If the formats it supports are Biff8, Embedded Object, Link Source, or
Link Source Descriptor - which were all registered with
RegisterClipboardFormat() - then it fills in, in the proper format, the data
into the provided STGMEDIUM.
- Then, on "Paste", Excel asks (the COleDataSource-derived class, by means
of OnRenderData()) for the formats: Link Source Descriptor, then Link
Source, and Link Source Descriptor again, and the application fills those
into the provided STGMEDIUMs again.
- But after the paste is done, what actually got pasted by Excel is a shape
object (with the round knobs to rotate and resize it). Although in the
formula bar I can see the correct content (a formula containing a moniker to
the cell that I copied in the first place) and the text in the shape object
is the text that was linked from a different workbook's cell.

So the BIG question is: Why does Excel paste the object as a shape, although
the data that was rendered was fine, and in the format required by Excel?
What I want is for Excel to paste the formula in the cell, and then the
evaluation will work (as it works now) and fill the content of the cell with
the result of the evaluation.

Anybody who has an answer? I would greatly appreciate any thought on this
issue, since it has made me tired with research.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
copy data from one sheet to another "entry has to be same shape" des-sa[_2_] Excel Discussion (Misc queries) 3 July 26th 08 06:38 PM
Excel 2007 PivotTable "arbitrary shape is not allowed when its elements cross a reference dimension" Michael Excel Discussion (Misc queries) 0 July 20th 06 06:00 PM
Align a picture/shape in the middle of a range("A1:H10") Andoni[_21_] Excel Programming 1 August 27th 04 07:44 AM
Align a picture/shape in the middle of a range("A1:H10") Andoni[_20_] Excel Programming 0 August 25th 04 11:09 PM


All times are GMT +1. The time now is 09:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"