ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Object size by copy/paste is different between Office 2003 and 200 (https://www.excelbanter.com/excel-programming/434771-object-size-copy-paste-different-between-office-2003-200-a.html)

fmamstr

Object size by copy/paste is different between Office 2003 and 200
 
Currently we are working on an add-in for Excel/PowerPoint/Word using Office
PIA(XP), the workflow is like this:

1) When the target application is Excel, we write our results directly into
Excel.Cell
2) When the target application is Word / PowerPoint, we first write the
results into Excel.Cell, then copy-paste the Excel.Range into Word/PowerPoint
as an static object via CLIPBOARD, but here we met a problem as described
below.

We want to control the "size" of the copy-paste result, we find that we can
get the original size from Excel.Range.Width and Excel.Range.Height. For
paste method, we use
PowerPoint.Slide.Application.ActiveWindow.View.Pas teSpecial()
function(PowerPoint, similar for Word). , the return value is the
object(PasteElement) that pasted into Word/PowerPoint and its size could be
manipulated by PasteElement.Width and PasteElement.Height property.
Since we want the result has the 100% ratio of the original one, so we
assign original size to PasteElement.Width and PasteElement.Height, but we
have different behavior in 2003 and 2007 when we test this value from Office
GUI.

In 2007, the final size ratio is 99% which is slightly different from target
value, but In 2003, the final size ratio is 95% of the original one which is
not acceptable for us, so I have 2 questions:

1. Since the code is same for Office 2003 and 2007, why there is such
difference?

2. Is copy/paste a good way to transfer data between different office
application(Excel - PowerPoint / Word)?

Does anyone know about this? Thanks!

Barb Reinhardt

Object size by copy/paste is different between Office 2003 and 200
 
I've had to change a registry setting so that Excel objects wouldn't resize
in PowerPoint.

http://support.microsoft.com/kb/300523

Might that be your problem?

"fmamstr" wrote:

Currently we are working on an add-in for Excel/PowerPoint/Word using Office
PIA(XP), the workflow is like this:

1) When the target application is Excel, we write our results directly into
Excel.Cell
2) When the target application is Word / PowerPoint, we first write the
results into Excel.Cell, then copy-paste the Excel.Range into Word/PowerPoint
as an static object via CLIPBOARD, but here we met a problem as described
below.

We want to control the "size" of the copy-paste result, we find that we can
get the original size from Excel.Range.Width and Excel.Range.Height. For
paste method, we use
PowerPoint.Slide.Application.ActiveWindow.View.Pas teSpecial()
function(PowerPoint, similar for Word). , the return value is the
object(PasteElement) that pasted into Word/PowerPoint and its size could be
manipulated by PasteElement.Width and PasteElement.Height property.
Since we want the result has the 100% ratio of the original one, so we
assign original size to PasteElement.Width and PasteElement.Height, but we
have different behavior in 2003 and 2007 when we test this value from Office
GUI.

In 2007, the final size ratio is 99% which is slightly different from target
value, but In 2003, the final size ratio is 95% of the original one which is
not acceptable for us, so I have 2 questions:

1. Since the code is same for Office 2003 and 2007, why there is such
difference?

2. Is copy/paste a good way to transfer data between different office
application(Excel - PowerPoint / Word)?

Does anyone know about this? Thanks!


fmamstr

Object size by copy/paste is different between Office 2003 and
 
Thanks Barb.

But it seems the link you provided is not the same thing that I described.
The link mentions about the editing of the "embedded objects", but in my
case, the Excel result is copied into PowerPoint/Word as an STATIC image but
the size is not what I specified in code.

Does anyone know how to control the final size of the image pasted into
PowerPoint/Word?

"Barb Reinhardt" wrote:

I've had to change a registry setting so that Excel objects wouldn't resize
in PowerPoint.

http://support.microsoft.com/kb/300523

Might that be your problem?

"fmamstr" wrote:

Currently we are working on an add-in for Excel/PowerPoint/Word using Office
PIA(XP), the workflow is like this:

1) When the target application is Excel, we write our results directly into
Excel.Cell
2) When the target application is Word / PowerPoint, we first write the
results into Excel.Cell, then copy-paste the Excel.Range into Word/PowerPoint
as an static object via CLIPBOARD, but here we met a problem as described
below.

We want to control the "size" of the copy-paste result, we find that we can
get the original size from Excel.Range.Width and Excel.Range.Height. For
paste method, we use
PowerPoint.Slide.Application.ActiveWindow.View.Pas teSpecial()
function(PowerPoint, similar for Word). , the return value is the
object(PasteElement) that pasted into Word/PowerPoint and its size could be
manipulated by PasteElement.Width and PasteElement.Height property.
Since we want the result has the 100% ratio of the original one, so we
assign original size to PasteElement.Width and PasteElement.Height, but we
have different behavior in 2003 and 2007 when we test this value from Office
GUI.

In 2007, the final size ratio is 99% which is slightly different from target
value, but In 2003, the final size ratio is 95% of the original one which is
not acceptable for us, so I have 2 questions:

1. Since the code is same for Office 2003 and 2007, why there is such
difference?

2. Is copy/paste a good way to transfer data between different office
application(Excel - PowerPoint / Word)?

Does anyone know about this? Thanks!



All times are GMT +1. The time now is 07:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com