ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro between Microsoft products?? (https://www.excelbanter.com/excel-discussion-misc-queries/21827-macro-between-microsoft-products.html)

HRobertson

Macro between Microsoft products??
 
Is it possible to create a Macro to run between 2 different Microsoft
products? For example...I would like to create a macro that would format a
spreadsheet, and create a few tables, then copy the tables into a PowerPoint
presentation.

Your help is tremedously appreciated.

Thank You.

Harald Staff

Hi

Yes, it's possible. See
http://erlandsendata.no/english/index.php?t=envbaole
on how to get started.

HTH. Best wishes Harald

"HRobertson" skrev i melding
...
Is it possible to create a Macro to run between 2 different Microsoft
products? For example...I would like to create a macro that would format

a
spreadsheet, and create a few tables, then copy the tables into a

PowerPoint
presentation.

Your help is tremedously appreciated.

Thank You.




MrT

Here some code to get you started :

Public Function CoppySelectionToPowerPoint()
Dim PptAPP As Object ' Declare variable to hold the reference.

Set PptAPP = CreateObject("powerpoint.application") 'set variable = to
PowerPoint Application
Selection.Copy 'coppy the selection to clipboard
PptAPP.Visible = True 'make PowerPoint visible
PptAPP.Presentations.Add WithWindow:=msoTrue 'create new presentation
in PowerPoint
PptAPP.ActivePresentation.Slides.Add Index:=1, Layout:=12 ' 1 =
ppLayoutBlank 'add a slide to the presentation
PptAPP.ActiveWindow.View.GotoSlide 1 'navigate to the first slide
PptAPP.ActiveWindow.View.Paste 'paste the selection in PowerPoint
Set PptAPP = Nothing 'release the variable
End Function

This copys the current selection from Excel into a new Powerpoint presentation

Have fun !

"HRobertson" wrote:

Is it possible to create a Macro to run between 2 different Microsoft
products? For example...I would like to create a macro that would format a
spreadsheet, and create a few tables, then copy the tables into a PowerPoint
presentation.

Your help is tremedously appreciated.

Thank You.


rose

I would like something similar - I'm in excel and I'd like to be able to open
a word document.

If the document is not to be stored on my personal hard drive but rather in
a shared drive, what needs to be done in order for the word document to be
able to be opened. My assumption is the excel doc will be downloaded and
used more as a template.

Very appreciate of your assistance..


"MrT" wrote:

Here some code to get you started :

Public Function CoppySelectionToPowerPoint()
Dim PptAPP As Object ' Declare variable to hold the reference.

Set PptAPP = CreateObject("powerpoint.application") 'set variable = to
PowerPoint Application
Selection.Copy 'coppy the selection to clipboard
PptAPP.Visible = True 'make PowerPoint visible
PptAPP.Presentations.Add WithWindow:=msoTrue 'create new presentation
in PowerPoint
PptAPP.ActivePresentation.Slides.Add Index:=1, Layout:=12 ' 1 =
ppLayoutBlank 'add a slide to the presentation
PptAPP.ActiveWindow.View.GotoSlide 1 'navigate to the first slide
PptAPP.ActiveWindow.View.Paste 'paste the selection in PowerPoint
Set PptAPP = Nothing 'release the variable
End Function

This copys the current selection from Excel into a new Powerpoint presentation

Have fun !

"HRobertson" wrote:

Is it possible to create a Macro to run between 2 different Microsoft
products? For example...I would like to create a macro that would format a
spreadsheet, and create a few tables, then copy the tables into a PowerPoint
presentation.

Your help is tremedously appreciated.

Thank You.



All times are GMT +1. The time now is 08:37 PM.

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