Inserting a Page from Word document into PowerPoint

User avatar
chamdan
3StarLounger
Posts: 372
Joined: 17 Dec 2013, 00:07

Inserting a Page from Word document into PowerPoint

Post by chamdan »

Hi,

I have done similar integration but using Excel range and integrate it into PowerPoint. Can this be done as well with Ms Word? if so, is there somewhere a sample I could use?

Thanks for your help!

Regards,

Chuck

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Inserting a Page from Word document into PowerPoint

Post by Rudi »

AFAIK, you can't really transfer a "page" to PPT.
A paragraph can be transferred, an outline can be imported or pictures, etc copied between the apps.
What exactly do you want to transfer?
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
chamdan
3StarLounger
Posts: 372
Joined: 17 Dec 2013, 00:07

Re: Inserting a Page from Word document into PowerPoint

Post by chamdan »

Inserting a Paragraph or a Word Table from Word into PowerPoint.

Chuck

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Inserting a Page from Word document into PowerPoint

Post by HansV »

And do you want to do this manually (it would simply be copy & paste), or using VBA from Word, or using VBA from PowerPoint?
Best wishes,
Hans

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Inserting a Page from Word document into PowerPoint

Post by Rudi »

OK. TX.

Hans is more accustomed to VBA for Word than I am, so I'll leave that in his capable hands.

In the meantime...and for further reference (if desired), see his reply here which illustrates moving various sections of a document to PPT.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
chamdan
3StarLounger
Posts: 372
Joined: 17 Dec 2013, 00:07

Re: Inserting a Page from Word document into PowerPoint

Post by chamdan »

Thanks Hans and Rudi I have accessed the link that Rudi gave me but had no chance yet to verify but based on what the person was asking Hans to help in achieving the task I guess that will give me a starting point. However to reply to Hans question, yes, I want to use a vba from word to export into PowerPoint or from PowerPoint import a paragraph or table from word.

Cheers!

Chuck

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Inserting a Page from Word document into PowerPoint

Post by HansV »

It would help if you provided detailed information - for example:

Do you want to transfer the current selection in the active Word document? If not, how should we determine what to transfer?

Should the code create a new presentation? Or should it create a new slide in an existing presentation (and if so, is that presentation already open in PowerPoint or should the code open it)? Or should it copy the paragraph/table into the active slide in the active presentation?
Best wishes,
Hans

User avatar
chamdan
3StarLounger
Posts: 372
Joined: 17 Dec 2013, 00:07

Re: Inserting a Page from Word document into PowerPoint

Post by chamdan »

Sorry for not giving you all the details Hans,

Here we go, make a selection of a paragraph and/or a Table and insert it into a PowerPoint Slide as new Slide within an existing Presentation. So insert it as new slide. Would this work if an amendment is done to the Paragraph in word and calling PowerPoint a gain and making the PowerPoint to update the links update automatically the PowerPoint? the sameway that it would react with Importing Excel? I guess it would make sense that the update would work. Would'nt be?

Regards,

Chuck

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Inserting a Page from Word document into PowerPoint

Post by HansV »

This is the best I can do - PowerPoint VBA is almost impenetrable. It does paste the selected text or table from Word as a link.

Code: Select all

Sub Copy2PPT()
    Dim pptApp As PowerPoint.Application
    Dim pptPrs As PowerPoint.Presentation
    Dim pptSld As PowerPoint.Slide
    On Error Resume Next
    Set pptApp = GetObject(Class:="PowerPoint.Application")
    Set pptPrs = pptApp.ActivePresentation
    On Error GoTo 0 ' ErrHandler
    If pptApp Is Nothing Then
        MsgBox "Start PowerPoint and open a presentation, then try again", vbExclamation
        Exit Sub
    End If
    Selection.Copy
    Set pptSld = pptPrs.Slides.AddSlide(pptPrs.Slides.Count + 1, pptPrs.SlideMaster.CustomLayouts(2))
    pptSld.Shapes.PasteSpecial DataType:=0, Link:=True
    Exit Sub
ErrHandler:
    MsgBox Err.Description, vbExclamation
End Sub
Best wishes,
Hans

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Inserting a Page from Word document into PowerPoint

Post by Rudi »

Barring some Dim statements and an If block...that code looks so foreign :crazy:
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
chamdan
3StarLounger
Posts: 372
Joined: 17 Dec 2013, 00:07

Re: Inserting a Page from Word document into PowerPoint

Post by chamdan »

:cheers: :thankyou: Hans. It worked but needed PowerPoint to be opened prior it works. With what I have achieved with Excel passing selection to PPTX, I will see and make the adjustment to open through VBA PowerPoint instead of opening PowerPoint manualy.

I appreciate your help Hans.

Regards,

Chuck

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Inserting a Page from Word document into PowerPoint

Post by HansV »

You can change the lines

Code: Select all

    Set pptApp = GetObject(Class:="PowerPoint.Application")
    Set pptPrs = pptApp.ActivePresentation
to

Code: Select all

    Set pptApp = CreateObject(Class:="PowerPoint.Application")
    Set pptPrs = pptApp.Presentations.Open("path-and-filename-of-existing-presentation")
Best wishes,
Hans

User avatar
chamdan
3StarLounger
Posts: 372
Joined: 17 Dec 2013, 00:07

Re: Inserting a Page from Word document into PowerPoint

Post by chamdan »

WoW! that was pretty fast! :fanfare: :thankyou:

Chuck