ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð°Ý¦X¨ÖA¤ÎB¨â­ÓPPTÀɮ׫á¡ABÀɮ׶W³sµ²ªºslide·|¶]±¼?

[µo°Ý] ½Ð°Ý¦X¨ÖA¤ÎB¨â­ÓPPTÀɮ׫á¡ABÀɮ׶W³sµ²ªºslide·|¶]±¼?

§Ú¨C­Ó¤ë¦³¦n´X­ÓpowerpointÀÉ®×­n¦X¨Ö®É¡A³£·|¹J¨ì¦¹°ÝÃD¡A½Ð°Ý¬O¶W³sµ²¤è¦¡­n­×¥¿¡AÁÙ¬O´¡¤J§ë¼v¤ù¤è¦¡¿ù»~(§Úªº´¡¤J¤è¦¡¬°'·s¼W§ë¼v¤ù'-->'­«½Æ¨Ï¥Î§ë¼v¤ù'-->'¿ï¨úB.ppt'-->§¹¦¨«áB.ppt¤ºªº¶W³sµ²¥þ³£¶]±¼¡C
¥t¥~¡A§Ú­n¦p¦ó¤~¥i§Q¥Î¥¨¶°¤è¦¡¦Û°Ê¦X¨Ö¼Æ­ÓÀÉ®×?²{¦b¤£¯à¿ý»s¥¨¶°¡A¾Ç°_¨Ó¯u¬O¦³ÂI¨¯­W¡A½Ð¦U¦ì¤j¤j±Ð±Ð§Ú!

¦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

TOP

¦^´_ 2# hjwang123


    ¦A1¦¸¦Û°Ý¦Ûµª¡A­ì¨Ósubaddress²Ä1½X¬°slideID¡A²Ä2½X¬°slideInDex¡A¥u­nslideID¸òªÌ¤@°_§ï¡A¶W³sµ²´N¦A¤]¤£·|¶]±¼¤F~

TOP

        ÀR«ä¦Û¦b : Ãø¦æ¯à¦æ¡AÃø±Ë¯à±Ë¡AÃø¬°¯à¬°¡A¤~¯àª@µØ¦Û§Úªº¤H®æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD