Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Fri, 10 Feb 2006 04:56:28 -0800,    group: microsoft.public.word.vba.customization        back       


PowerPoint 2000 Slides into Word 2000   
In Word 2000 I would a user to select a PowerPoint 2000 presentation and put 
the slides into the Word 2000 document.

The options in Word 2000 I tried gives me:
1. Just the first slide in a thumbnail size
2. Or a lot of ASCII signs

I tried Insert, Object and Insert, File

HELP!!!
date: Fri, 10 Feb 2006 04:56:28 -0800   author:   Peter Faulhaber Peter

Re: PowerPoint 2000 Slides into Word 2000   
Peter Faulhaber wrote:
> In Word 2000 I would a user to select a PowerPoint 2000 presentation
> and put the slides into the Word 2000 document.
>
> The options in Word 2000 I tried gives me:
> 1. Just the first slide in a thumbnail size
> 2. Or a lot of ASCII signs
>
> I tried Insert, Object and Insert, File
>
> HELP!!!

In Word, an object can't extend over more than one page, which accounts for
#1; and Insert > File can handle only Word documents and text files.

This is most easily done (without a macro) by opening the presentation in
PowerPoint and using File > Send To > Microsoft Word. That will
automatically create a Word document with a separate page for each slide.

If you insist on running this from the Word end, you need a macro like the
following. Create a module in a template, and (IMPORTANT!) go to Tools >
References and put a check mark next to "Microsoft PowerPoint Object
Library". Then paste the code into the editing window.

Sub ImportPowerPoint()
   Dim ppt As PowerPoint.Application
   Dim pptPres As PowerPoint.Presentation
   Dim pptSlide As PowerPoint.Slide
   Dim dlg As Dialog
   Dim strPresName As String
   Dim wdDoc As Word.Document
   Dim wdRg As Word.Range

   ' get the user to select the presentation
   Set dlg = Dialogs(wdDialogFileOpen)
   With dlg
      .Name = "*.ppt"
      If .Display = -1 Then   ' OK
         strPresName = WordBasic.FileNameInfo$(.Name, 1)
         Set dlg = Nothing
      Else
         Set dlg = Nothing
         Exit Sub
      End If
   End With

   On Error GoTo bye
   ' open the presentation in PowerPoint
   Set ppt = New PowerPoint.Application
   ppt.Visible = msoTrue
   Set pptPres = ppt.Presentations.Open(strPresName)

   ' make a new blank Word document
   Set wdDoc = Documents.Add

' ' The following is optional and can be
' ' set to different values
'
'   With wdDoc.PageSetup
'      .Orientation = wdOrientLandscape
'      .TopMargin = InchesToPoints(0.5)
'      .BottomMargin = InchesToPoints(0.5)
'      .LeftMargin = InchesToPoints(0.5)
'      .RightMargin = InchesToPoints(0.5)
'   End With

   ' copy each slide and paste into Word
   For Each pptSlide In pptPres.Slides
      Set wdRg = wdDoc.Range
      wdRg.Collapse wdCollapseEnd
      pptSlide.Copy
      wdRg.Paste
      wdRg.Collapse wdCollapseEnd
      wdRg.Text = vbCr & vbFormFeed
   Next
   ' eliminate extra page
   wdDoc.Characters.Last.Previous.Delete

   pptPres.Close
   ppt.Quit
   Set pptPres = Nothing
   Set ppt = Nothing

   ' show Save As dialog
   wdDoc.Save
bye:
End Sub

-- 
Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
date: Fri, 10 Feb 2006 10:25:01 -0500   author:   Jay Freedman

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us