Как объединить несколько файлов PowerPoint в один файл?

6560
threeFourOneSixOneThree

Есть ли простой способ объединить несколько файлов PowerPoint в один файл?

Под ms dos для бинарных файлов вы можете скопировать их с помощью / b или в соответствии с этим вопросом SO просто используйте copy

 copy /b <source1> + <source2> [....] <targetfile> // or copy *.csv new.csv 

Я попробовал позже, copy *.pptx new.pptxно это не сработало - полученный pptx был пуст. Первый подход, использующий, copy /bтребует, чтобы ввести каждое имя файла, которое является громоздким, и я не пробовал.

У вас есть идеи, как я могу справиться с этим?

0
Это вариант сделать это вручную? Поскольку есть функция для этого внутри PowerPoint. AirPett 7 лет назад 0
Зависит от того, насколько это удобно - могу ли я выбрать несколько файлов одновременно или мне нужно повторять шаги для каждого файла? threeFourOneSixOneThree 7 лет назад 0
Согласно [this] (http://www.online-tech-tips.com/free-software-downloads/merge-powerpoint-ppt-files/) вы должны сделать это вручную для каждого файла. ** Но ** если вы не собираетесь редактировать большую презентацию после ее создания, самый простой способ - преобразовать все файлы в PDF (вы можете найти инструмент, который автоматически делает это для 100 файлов), а затем объединить эти PDF -файлы как один большой файл (сделано тысячу раз с помощью Adobe Acrobat) AirPett 7 лет назад 0

1 ответ на вопрос

1
Sudipta Biswas

Yes, you can, but you can't do it with Binary Appending.

Why...??
Because a CSV is a comma separated values file, which allows data to be saved in a table structured format. CSVs look like a garden-variety spreadsheet but with a .csv extension. So when you append them, you can still use them in excel. But .pptx have different formats that are not so simple. hence Binary appending won't work.

The following code will insert all slides from all presentations in the same folder as the currently active presentation (but won't try to insert slides from the current presentation into itself). (Personally Tested)

Follow the steps:

  1. Create a New Folder.
  2. For appending Mutiple Files, Save the current file in the new folder in which you want to insert slides from other files.

  3. Copy all the other .pptx or .ppt files to the new folder Open the document in which you want to add files.

  4. Now Press ALT+F11 to start the VBA editor.

  5. Or choose File | Options | Customize Ribbon and put a checkmark next to Developer in the listbox under Customize Ribbon. Close the options dialog box, click the Developer tab then click Visual Basic to start the editor.

  6. In the VBA editor, make sure that your presentation is highlighted in the left-hand pane.
    Choose Insert, Module from the menu bar to insert a new code module into your project.

  7. Paste this Code & Change "*.PPT" to "*.PPTX" or whatever if necessary

    Sub InsertAllSlides() ' Insert all slides from all presentations in the same folder as this one ' INTO this one; do not attempt to insert THIS file into itself, though. Dim vArray() As String Dim x As Long ' Change "*.PPT" to "*.PPTX" or whatever if necessary: EnumerateFiles ActivePresentation.Path & "\", "*.PPT", vArray With ActivePresentation For x = 1 To UBound(vArray) If Len(vArray(x)) > 0 Then .Slides.InsertFromFile vArray(x), .Slides.Count End If Next End With End Sub Sub EnumerateFiles(ByVal sDirectory As String, _ ByVal sFileSpec As String, _ ByRef vArray As Variant) ' collect all files matching the file spec into vArray, an array of strings Dim sTemp As String ReDim vArray(1 To 1) sTemp = Dir$(sDirectory & sFileSpec) Do While Len(sTemp) > 0 ' NOT the "mother ship" ... current presentation If sTemp <> ActivePresentation.Name Then ReDim Preserve vArray(1 To UBound(vArray) + 1) vArray(UBound(vArray)) = sDirectory & sTemp End If sTemp = Dir$ Loop End Sub 
  8. To make sure there are no serious syntax problems with the code, choose Debug, Compile from the menu bar.
  9. If there is an error check the code again, else click the Run button.
  10. the Slides will be added to the opened document.

NOTE : Background Pictures & some other elements are not added when slides are added from another file.

See & Learn More From :

Спасибо за ваш ответ. В PowerPoint 2013 это должно повторяться для каждого файла. Я ищу сделать это в цикле для n файлов одновременно. threeFourOneSixOneThree 7 лет назад 0
Попробуйте метод макроса. Дано внизу. Sudipta Biswas 7 лет назад 0
Видите, я все заново отредактировал, все работает, подтвердил, что тестировал. Sudipta Biswas 7 лет назад 0
Видите, вы можете использовать это тоже, но я получаю некоторые ошибки при компиляции http://stackoverflow.com/questions/5316459/programmatics-combine-slides-from-multiple-presentations-into-a-single-presen Sudipta Biswas 7 лет назад 0

Похожие вопросы