- ©«¤l
- 3
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 20
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office2010
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taiwan
- µù¥U®É¶¡
- 2014-7-12
- ³Ì«áµn¿ý
- 2017-1-11
|
¦n§a¡A§Ú´N¥ý¦Û°Ý¦Ûµª¡APO¤@¬q¥Ø«eªº¸Ñµ²¤è¦¡
Dim file(50) As String
Sub start()
Form1.Show
End Sub
Sub ¦X¨Ö§ë¼v¤ù(file, fn)
Dim path As String
Dim inputFileName As String
Dim outputFileName As String
Dim slideNum As Integer
Dim x As Design '«Å§i x ¬° Design ª«¥ó.
Dim add, newadd As String
Dim hylk As Long
Dim page(50), pagetotal As Long
outputFileName = "allinone.pptx"
Set pptApp = New PowerPoint.Application
pptApp.Visible = msoTrue
Set pptOutput = pptApp.Presentations.Open("d:\" & outputFileName)
If pptOutput.Slides.Count = 0 Then
Set newSlide = pptOutput.Slides.add(1, ppLayoutBlank)
End If
For k = 1 To fn
Set pptInput = pptApp.Presentations.Open(file(k))
page(k) = pptInput.Slides.Count
pagetotal = pagetotal + page(k)
For j = 1 To pptInput.Slides.Count 'j¬°inputÀÉ®×(k)ªº§ë¼v¤ù¼Æ
If k = 1 Then '¦p¬°²Ä1ÓinputÀɮסA¤£»Ý§ïÅܶW³sµ²¦ì¸m¡Aª½±µ½Æ»s§ë¼v¤ù¤Î¨Ó·½®æ¦¡(§t¥À¤ù)§Y¥i
pptInput.Slides(j).Copy
Set x = pptInput.Slides(j).Design '±N¸Ó§ë¼v¤ù®æ¦¡³]©w¥Îxª«¥ó«O¦s.
pptOutput.Slides.Paste(pptOutput.Slides.Count).Design = x
Else
pptInput.Slides(j).Copy
Set x = pptInput.Slides(j).Design '±N¸Ó§ë¼v¤ù®æ¦¡³]©w¥Îxª«¥ó«O¦s.
pptOutput.Slides.Paste(pptOutput.Slides.Count).Design = x
M = pptOutput.Slides.Count
With pptOutput.Slides(M - 1)
For Each oHl In pptOutput.Slides(M - 1).Hyperlinks
With oHl
sSubaddress = .SubAddress
mystr = Replace(sSubaddress, ",", ".")
Value = Val(mystr)
ID1 = Int(Value) '¨ú±osubaddress¤¤²Ä1½X
strID2 = Replace(sSubaddress, ID1 & ",", "")
ID2 = Val(strID2) '¨ú±osubaddress¤¤²Ä2½X¡A ¶¼Æ
newID = ID2 + pagetotal - page(k)
newadd = Str(ID1) & "," & Str(newID) & ","
.SubAddress = newadd '×¥¿¶W³sµ²¤§¶½X
End With
Next
End With
End If
Next j
Next k
End Sub
¤£¹L¦³Ó°ÝÃDÁÙ¨S¸Ñ¨M¡A´N¬O¦pªG³£¥Î¶W³sµ²¬OOK¡A¦ý¬O¦pªG¦³ªº¬O¥Î°Ê§@«ö¶s³]©wªº¤è¦¡¡A¦X¨Ö«á¤´µLªk¥¿½T³sµ²¡A§Ú·Q°ÝÃDÀ³¬OSUBADDRESSªº½s½X§ÚÁÙ¤£¬O¨º»ò²M·¡¡A¤×¨ä¬O²Ä1½X |
|