⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 批量文件整合1.0版.frm

📁 使用说明: 1、本软件为多个零碎的字符文件的合并提供了方便
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "批量字符文件整合"
   ClientHeight    =   8310
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8610
   LinkTopic       =   "Form1"
   ScaleHeight     =   8310
   ScaleWidth      =   8610
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "完成退出"
      Height          =   1215
      Left            =   1080
      TabIndex        =   2
      Top             =   4560
      Width           =   1935
   End
   Begin VB.TextBox Text1 
      Height          =   3255
      Left            =   3120
      MultiLine       =   -1  'True
      ScrollBars      =   3  'Both
      TabIndex        =   1
      Top             =   1320
      Width           =   3735
   End
   Begin VB.CommandButton Command1 
      Caption         =   "开始整合"
      Height          =   975
      Left            =   960
      TabIndex        =   0
      Top             =   1560
      Width           =   1815
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click() '''''''''''''该程序的目的:将多个字符文件的内容按顺序写入到文本框里
                             ''''''''''''''然后在将其写入到一个word文件中保存,省去了很多功夫
                    '''''''不足之处,文本框有字数限制
  Text1.Text = ""
  n = InputBox("输入所要整合的文件个数")
  nn = "如 .TXT或者 .doc等等字符文件"
   ST = InputBox(nn, "请将所要整合的文件和该程序放到同一文件夹下,并输入所要整合的文件的路径")
 SS = InputBox(nn, "输入所要整合的文件的格式")
 m = Val(n) * 1
   k = 1
  For i = 1 To m
      If Len(Text1.Text) >= 65535 Then
        k = k + 1
           Open App.Path & "\整合后的文件" & k - 1 & SS For Output As #k
                Print #k, Text1.Text
           Close #k
        Text1.Text = ""
        i = i - 1
      End If
      
        Open App.Path & "\" & i & ST For Input As #1  ' 打开文件
    Do While Not EOF(1)
         Line Input #1, inp
         Text1 = Text1 + inp + vbCrLf
    Loop
        Close #1 ' 关闭文件
  Next i
  
           Open App.Path & "\整合后的文件" & k & SS For Output As #(k + 1)
               Print #(k + 1), Text1.Text
           Close #(k + 1)

  For i = 1 To k
           Open App.Path & "\整合后的文件" & i & SS For Input As #(k + 2)
    Do While Not EOF(k + 2)
         Line Input #(k + 2), inp
         TT = TT + inp + vbCrLf
    Loop
           Close #(k + 2)
           
  Next i
  
           Open App.Path & "\整合后的文件" & (k + 1) & SS For Output As #(k + 3)
               Print #(k + 3), TT
           Close #(k + 3)
  
   
   MsgBox ("整合完毕")
   
   'Print Len(Text1.Text)
     
   
   
End Sub

Private Sub Command2_Click()
End
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -