Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Error closing embedded Excel workbook in PowerPoint

I have an embedded Excel workbook in PowerPoint. I would like to save the
workbook but I get an error message.

Here is what the code looks like:

PowerPoint.OLEFormat oleFormat = shape.OLEFormat;
oleFormat.Activate();
Excel.Workbook workbook = (Excel.Workbook)oleFormat.Object;

string fileName = "c\\temp\\text.xls";
workbook.Close(true, fileName, missing);

Is it possible to save the embedded Excel workbook to file? Is so, what's
the best way to do it?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default Error closing embedded Excel workbook in PowerPoint

I have not done this with Powerpoint but in Word. I can save the embedded
worksheet as follows:

ActiveDocument.InlineShapes(1).OLEFormat.Activate
ActiveDocument.InlineShapes(1).OLEFormat.Object.Sa veAs "c:\xx2.xls"

Note: The index of InLineShapes may vary ( I have only one embedded object).
The embedded Excel object cannot be saved unless it has been ActivateED.

"Gail Hurn" wrote:

I have an embedded Excel workbook in PowerPoint. I would like to save the
workbook but I get an error message.

Here is what the code looks like:

PowerPoint.OLEFormat oleFormat = shape.OLEFormat;
oleFormat.Activate();
Excel.Workbook workbook = (Excel.Workbook)oleFormat.Object;

string fileName = "c\\temp\\text.xls";
workbook.Close(true, fileName, missing);

Is it possible to save the embedded Excel workbook to file? Is so, what's
the best way to do it?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Error closing embedded Excel workbook in PowerPoint

That didn't work in PowerPoint. SaveAs throws an exception.


"AA2e72E" wrote:

I have not done this with Powerpoint but in Word. I can save the embedded
worksheet as follows:

ActiveDocument.InlineShapes(1).OLEFormat.Activate
ActiveDocument.InlineShapes(1).OLEFormat.Object.Sa veAs "c:\xx2.xls"

Note: The index of InLineShapes may vary ( I have only one embedded object).
The embedded Excel object cannot be saved unless it has been ActivateED.

"Gail Hurn" wrote:

I have an embedded Excel workbook in PowerPoint. I would like to save the
workbook but I get an error message.

Here is what the code looks like:

PowerPoint.OLEFormat oleFormat = shape.OLEFormat;
oleFormat.Activate();
Excel.Workbook workbook = (Excel.Workbook)oleFormat.Object;

string fileName = "c\\temp\\text.xls";
workbook.Close(true, fileName, missing);

Is it possible to save the embedded Excel workbook to file? Is so, what's
the best way to do it?

Thanks

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
updating embedded powerpoint in excel file txm49 Excel Discussion (Misc queries) 0 September 24th 09 08:16 PM
Embedded Excel Objects in PowerPoint resize after editing Barb Reinhardt Excel Discussion (Misc queries) 0 September 21st 09 06:41 PM
Error message adaytum.xla when closing workbook in Excel 2003 Laura2008 Excel Discussion (Misc queries) 1 November 5th 08 06:36 PM
Problem in updating the Powerpoint Embedded Chart with Excel figur Vinod Charts and Charting in Excel 0 May 4th 07 02:19 PM
EXCEL.EXE has generated an error...when closing a workbook HEIKKILÄT Excel Programming 1 September 17th 03 09:16 PM


All times are GMT +1. The time now is 10:18 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"