MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 30th, 2004, 05:10 PM   #1
earlyd
 
Join Date: Dec 2002
Posts: 1,199
Default Enable Macros Msg

We have a macro that copies numeric and graph data to Powerpoint. When we go to print in Powerpoint, we get the enable macros message for every slide that has the data copied from Excel. Any idea how to stop that message from popping up? We are just using the normal print feature of Powerpoint and it gives us an Excel warning message about macros. We want to send this to others and don't want them to have to see the message when they print the presentation.
__________________
Lift up your eyes, round about, and see
earlyd is offline   Reply With Quote
Old Mar 30th, 2004, 05:37 PM   #2
Cbrine
 
Cbrine's Avatar
 
Join Date: Dec 2003
Location: Brampton
Posts: 3,174
Default Re: Enable Macros Msg

When you paste data to power point from excel, it copies the entie workbook, code and all, and pastes it to powerpoint as an excel object. To stop this from happening your will need to modify your copy macro to do a paste special...picture.

Note: You will lose all editing capability of the values, but if the graphs and values are static this shouldn't be a problem.

Hope this helps.
__________________
Xcelerated Solutions
Office Automation Solutions for the Toronto Area
Cbrine is offline   Reply With Quote
Old Mar 30th, 2004, 05:55 PM   #3
earlyd
 
Join Date: Dec 2002
Posts: 1,199
Default Re: Enable Macros Msg

Thanks CBrine...I did do a copyPicture...

We will need the editing capability, suppose we can change it to objects?

I'll try changing the paste & get back to you.
__________________
Lift up your eyes, round about, and see
earlyd is offline   Reply With Quote
Old Mar 30th, 2004, 06:21 PM   #4
earlyd
 
Join Date: Dec 2002
Posts: 1,199
Default Re: Enable Macros Msg

Was able to go into powerpoint and run a macro but trying to run from Excel gives me an error - Excel doesn't recognize Picture in the following...
PPApp.ActiveWindow.View.PasteSpecial.Select DataType:=Picture, _
link:=msoFalse

I need to paste into powerpoint as a picture and with no link. Any ideas?
__________________
Lift up your eyes, round about, and see
earlyd is offline   Reply With Quote
Old Mar 30th, 2004, 07:03 PM   #5
Cbrine
 
Cbrine's Avatar
 
Join Date: Dec 2003
Location: Brampton
Posts: 3,174
Default Re: Enable Macros Msg

I think you have 2 choices.

1. Can you make your VBA Macro create a copy of the workbook, without the code, that can be associated to the power point presentation? This would be the easiest way. If the Excel Object doesn't have any macro code, you won't receive the message.

2. You would need to setup your macro to somehow, remove the macro code from the workbook object. I know this can be done on a workbook, but I'm not sure if you can on an Excel Object. If you could figure out how to reference the PowerPoint Excel Object, you should be able to programmatically remove the modules from it.
__________________
Xcelerated Solutions
Office Automation Solutions for the Toronto Area
Cbrine is offline   Reply With Quote
Old Mar 30th, 2004, 08:43 PM   #6
earlyd
 
Join Date: Dec 2002
Posts: 1,199
Default Re: Enable Macros Msg

CBrine - GREAT HELP - used #1 (sort of). Macro creates a new book, copies graph on the fly, copies from there to Powerpt and deletes new book. A little clunky but worked. Great tip. THANKS.
__________________
Lift up your eyes, round about, and see
earlyd is offline   Reply With Quote
Old Mar 30th, 2004, 08:49 PM   #7
Cbrine
 
Cbrine's Avatar
 
Join Date: Dec 2003
Location: Brampton
Posts: 3,174
Default Re: Enable Macros Msg

Ah, but the only one who know that it is clunky is you. Everyone else will Oh and Ah over it.

PS-I agree, I think the removing of the code on the fly would be a better solution, but it would take longer to implement this solution.

Good Luck.
__________________
Xcelerated Solutions
Office Automation Solutions for the Toronto Area
Cbrine is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 07:53 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.