English 中文(简体)
幻灯片从幻灯片号中流放到Word,使用VBA
原标题:Paste text from slide number placeholder on PowerPoint slide into Word, using VBA

我正试图复制三件电击幻灯片,并将之带入魔 Word(用VBA Marco在PowerPoint): (1) 滑坡号 2) 滑坡图形和幻灯片。

能够使用<条码>Place holder(2)冲动幻灯片的Im,但在试图复制幻灯片的持有人时,我可以采取同样的做法。 我只能通过提供形状<代码”的确切名称来开展工作。 页: 1

我在寻找点人,看他们如何复制幻灯片号码持有人,而不必知道形状的确切名称。

增 编

Sub PPTtoWord()

  Copy slide 1, paste as picture onto slide 1, resize, and rename

ActivePresentation.Slides(1).Copy

Set mySlideCopy = ActivePresentation.Slides(1).Shapes.Paste

With mySlideCopy

  .Name = "Slide Thumbnail"
  .Left = 0
  .Top = 0
  .Height = 400
  .Width = 200
 
End With

  Set up Word

Dim wdApp As Word.Application, wdDoc As Word.Document

    Set wdApp = GetObject(, "Word.Application")
    If wdApp Is Nothing Then Set wdApp = New Word.Application
    Set wdDoc = wdApp.ActiveDocument
    
  Copy slide number from a placeholder on slide 1 over to Word

Set myDocument = ActivePresentation.Slides(1)

  ********** This is where the problem is *****************
ActivePresentation.Slides(1).Shapes("Slide Number Placeholder 77").TextFrame.TextRange.Copy
  *********************************************************

wdApp.Selection.PasteAndFormat wdFormatPlainText
wdApp.Selection.Move

   Copy slide thumbnail from slide 1 over to Word, then delete it

ActivePresentation.Slides(1).Shapes("Slide Thumbnail").Copy

wdApp.Selection.PasteAndFormat wdPasteDefault
wdApp.Selection.Move

ActivePresentation.Slides(1).Shapes("Slide Thumbnail").Delete

  Copy slide notes from slide 1 notes master over to Word

ActivePresentation.Slides(1).NotesPage.Shapes.Placeholders(2).TextFrame.TextRange.Copy
   
wdApp.Selection.PasteAndFormat wdPasteDefault
wdApp.Selection.Move


End Sub

(我热切希望把这三件事摆在桌面上,并重复所有幻灯片,但首先需要做这项工作)。)

问题回答

暂无回答




相关问题
Handling no results for docmd.applyfilter

I have an Access app where I use search functionality. I have a TextBox and a Search Button on the form, and it does a wildcard search of whatever the user enters in the TextBox, and displays the ...

Outlook 2007 CommandBarControl.Execute won t work

I recently switched to Outlook 2007 and noticed that my VBA-macros won t work. I use the following code to open a new appointment-item (and fill it automatically). It worked perfect in Outlook 2003, ...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

MS Access: list macro from VBA

I have to deal with a few macros (not VBA) in an inherited Access application. In order to document them, I would like to print or list the actions in those macros, but I am very dissatisfied by ...

热门标签