DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub SunumBirlestir()
Dim i As Integer, j As Integer, myFile As String
Dim LogFile As String, FileNum As Long, myMsg As Variant
Dim intCount As Integer, intCount2 As Integer
ActivePresentation.SaveAs "E:\SlaytBirlestir\BirlestirilmisDosya.pptx", ppSaveAsOpenXMLPresentation, msoTrue
LogFile = ActivePresentation.Path & "\Log.txt"
FileNum = FreeFile
Open LogFile For Output As FileNum
Print #FileNum, "Alınan dosyalar:" & vbCrLf
For i = 1 To 1500
myFile = "E:\Slaytları Buraya Kopyalayın\TOPLU\" & i & ".pptx"
If Dir(myFile) <> Empty Then
j = j + 1
Print #FileNum, j & ") " & Dir(myFile)
ActivePresentation.SectionProperties.AddSection j, Dir(myFile)
intCount = ActivePresentation.Slides.Count
ActivePresentation.Slides.InsertFromFile myFile, intCount
intCount2 = ActivePresentation.Slides.Count
If j > 1 Then
For k = intCount2 To intCount + 1 Step -1
ActivePresentation.Slides(k).MoveToSectionStart (j)
Next
End If
End If
Next
Close #FileNum
ActivePresentation.Save
myMsg = MsgBox("İşlem tamam... Log dosyasını görüntülemek istiyor musunuz?", vbYesNo)
If myMsg = vbYes Then
Shell "notepad.exe " & LogFile, vbNormalFocus
End If
End Sub
.............
.......
... eğer bölüm ismi 5.pptx ise bölümündeki her dosyanın altına veya uygun bir yerine 5.Dosya diye yazmasını istiyorum. üç beş sunum dosyası olsa hiç problem oluşturmaz ama haftalık olarak en az 1500 sunumu bu şekilde birleştirip numaralandırmak zorunda kalıyorum. bu büyük bir iş yükü oluşturuyor.
Sub Test8()
'Haluk 19/02/2020
'sa4truss@gmail.com
Dim i As Integer, j As Integer, myFile As String
Dim LogFile As String, FileNum As Long, myMsg As Variant
Dim intCount As Integer, intCount2 As Integer
Dim shp As Shape
ActivePresentation.SaveAs "C:\Users\" & Environ("Username") & "\Desktop\BirlestirilmisDosya.pptx", ppSaveAsOpenXMLPresentation, msoTrue
LogFile = ActivePresentation.Path & "\Log.txt"
FileNum = FreeFile
Open LogFile For Output As FileNum
Print #FileNum, "Alınan dosyalar:" & vbCrLf
For i = 1 To 1500
myFile = "D:\TestFolder\" & i & ".pptx"
If Dir(myFile) <> Empty Then
j = j + 1
Print #FileNum, j & ") " & Dir(myFile)
ActivePresentation.SectionProperties.AddSection j, Dir(myFile)
intCount = ActivePresentation.Slides.Count
ActivePresentation.Slides.InsertFromFile myFile, intCount
intCount2 = ActivePresentation.Slides.Count
Set shp = ActivePresentation.Slides(intCount + 1).Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, _
Left:=400, Top:=100, Width:=180, Height:=20)
shp.TextFrame.TextRange.Text = Dir(myFile)
shp.TextFrame.TextRange.Font.Size = 13
shp.TextFrame.TextRange.Font.Bold = msoTrue
shp.TextFrame.TextRange.Font.Color = RGB(0, 0, 255)
shp.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter
shp.Line.DashStyle = msoLineSolid
If j > 1 Then
For k = intCount2 To intCount + 1 Step -1
ActivePresentation.Slides(k).MoveToSectionStart (j)
Next
End If
End If
Next
Close #FileNum
ActivePresentation.Save
myMsg = MsgBox("İşlem tamam... Log dosyasını görüntülemek istiyor musunuz?", vbYesNo)
If myMsg = vbYes Then
Shell "notepad.exe " & LogFile, vbNormalFocus
End If
End Sub
Değerli Hocam Siz Bir Harikasınız. Allah Razı olsun Sadece her bölümün ilk sayfasında çıkıyor ama olsun daha fazla kasmaya gerek yok sanırım. bu kadarı da mükemmel olmuş. Ellerinize Sağlık.Kod:Sub Test8() 'Haluk 19/02/2020 'sa4truss@gmail.com Dim i As Integer, j As Integer, myFile As String Dim LogFile As String, FileNum As Long, myMsg As Variant Dim intCount As Integer, intCount2 As Integer Dim shp As Shape ActivePresentation.SaveAs "C:\Users\" & Environ("Username") & "\Desktop\BirlestirilmisDosya.pptx", ppSaveAsOpenXMLPresentation, msoTrue LogFile = ActivePresentation.Path & "\Log.txt" FileNum = FreeFile Open LogFile For Output As FileNum Print #FileNum, "Alınan dosyalar:" & vbCrLf For i = 1 To 1500 myFile = "D:\TestFolder\" & i & ".pptx" If Dir(myFile) <> Empty Then j = j + 1 Print #FileNum, j & ") " & Dir(myFile) ActivePresentation.SectionProperties.AddSection j, Dir(myFile) intCount = ActivePresentation.Slides.Count ActivePresentation.Slides.InsertFromFile myFile, intCount intCount2 = ActivePresentation.Slides.Count Set shp = ActivePresentation.Slides(intCount + 1).Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, _ Left:=400, Top:=100, Width:=180, Height:=20) shp.TextFrame.TextRange.Text = Dir(myFile) shp.TextFrame.TextRange.Font.Size = 13 shp.TextFrame.TextRange.Font.Bold = msoTrue shp.TextFrame.TextRange.Font.Color = RGB(0, 0, 255) shp.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter shp.Line.DashStyle = msoLineSolid If j > 1 Then For k = intCount2 To intCount + 1 Step -1 ActivePresentation.Slides(k).MoveToSectionStart (j) Next End If End If Next Close #FileNum ActivePresentation.Save myMsg = MsgBox("İşlem tamam... Log dosyasını görüntülemek istiyor musunuz?", vbYesNo) If myMsg = vbYes Then Shell "notepad.exe " & LogFile, vbNormalFocus End If End Sub
Sub Test9()
'Haluk 20/02/2020
'sa4truss@gmail.com
Dim i As Integer, j As Integer, myFile As String
Dim LogFile As String, FileNum As Long, myMsg As Variant
Dim intCount As Integer, intCount2 As Integer
Dim shp As Shape, x As Integer, y As Integer
ActivePresentation.SaveAs "C:\Users\" & Environ("Username") & "\Desktop\BirlestirilmisDosya.pptx", ppSaveAsOpenXMLPresentation, msoTrue
LogFile = ActivePresentation.Path & "\Log.txt"
FileNum = FreeFile
Open LogFile For Output As FileNum
Print #FileNum, "Alınan dosyalar:" & vbCrLf
For i = 1 To 1500
myFile = "D:\TestFolder\" & i & ".pptx"
If Dir(myFile) <> Empty Then
j = j + 1
Print #FileNum, j & ") " & Dir(myFile)
ActivePresentation.SectionProperties.AddSection j, Dir(myFile)
intCount = ActivePresentation.Slides.Count
ActivePresentation.Slides.InsertFromFile myFile, intCount
intCount2 = ActivePresentation.Slides.Count
If j > 1 Then
For k = intCount2 To intCount + 1 Step -1
ActivePresentation.Slides(k).MoveToSectionStart (j)
Next
End If
End If
Next
Close #FileNum
With ActivePresentation.SectionProperties
For x = 1 To .Count
For j = 1 To ActivePresentation.SectionProperties.SlidesCount(x)
y = y + 1
Set shp = ActivePresentation.Slides(y).Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, _
Left:=400, Top:=100, Width:=180, Height:=20)
shp.TextFrame.TextRange.Text = .Name(x)
shp.TextFrame.TextRange.Font.Size = 13
shp.TextFrame.TextRange.Font.Bold = msoTrue
shp.TextFrame.TextRange.Font.Color = RGB(0, 0, 255)
shp.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter
shp.Line.DashStyle = msoLineSolid
Next
Next
End With
ActivePresentation.Save
myMsg = MsgBox("İşlem tamam... Log dosyasını görüntülemek istiyor musunuz?", vbYesNo)
If myMsg = vbYes Then
Shell "notepad.exe " & LogFile, vbNormalFocus
End If
End Sub
shp.Fill.ForeColor.RGB = RGB(255, 255, 255) ' Beyaz
shp.Fill.ForeColor.RGB = RGB(255, 0, 0) ' Kirmizi
Kod:Sub SunumBirlestir() Dim i As Integer, j As Integer, myFile As String Dim LogFile As String, FileNum As Long, myMsg As Variant Dim intCount As Integer, intCount2 As Integer Dim shp As Shape, x As Integer, y As Integer ActivePresentation.SaveAs "E:\SlaytBirlestir\BirlestirilmisDosya.pptx", ppSaveAsOpenXMLPresentation, msoTrue LogFile = ActivePresentation.Path & "\Log.txt" FileNum = FreeFile Open LogFile For Output As FileNum Print #FileNum, "Alınan dosyalar:" & vbCrLf For i = 1 To 1500 myFile = "E:\Slaytları Buraya Kopyalayın\TOPLU\" & i & ".pptx" If Dir(myFile) <> Empty Then j = j + 1 Print #FileNum, j & ") " & Dir(myFile) ActivePresentation.SectionProperties.AddSection j, Dir(myFile) intCount = ActivePresentation.Slides.Count ActivePresentation.Slides.InsertFromFile myFile, intCount intCount2 = ActivePresentation.Slides.Count If j > 1 Then For k = intCount2 To intCount + 1 Step -1 ActivePresentation.Slides(k).MoveToSectionStart (j) Next End If End If Next Close #FileNum With ActivePresentation.SectionProperties For x = 1 To .Count For j = 1 To ActivePresentation.SectionProperties.SlidesCount(x) y = y + 1 Set shp = ActivePresentation.Slides(y).Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, _ Left:=2, Top:=32, Width:=100, Height:=20) shp.TextFrame.TextRange.Text = .Name(x) shp.TextFrame.TextRange.Font.Size = 15 shp.TextFrame.TextRange.Font.Bold = msoTrue shp.Fill.ForeColor.RGB = RGB(255, 235, 205) ' Beyaz shp.TextFrame.TextRange.Font.Color = RGB(178, 34, 34) shp.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter shp.Line.DashStyle = msoLineSolid Next Next End With ActivePresentation.Save myMsg = MsgBox("İşlem tamam... Log dosyasını görüntülemek istiyor musunuz?", vbYesNo) If myMsg = vbYes Then Shell "notepad.exe " & LogFile, vbNormalFocus End If End Sub
Kodu nereye yapıştıracağınızı biliyorsunuz, herhalde ....
.