BVA将excel题库转换为word版
'单选题有答案相关代码: Sub 单选有答案() Dim WdApp As Word.Application Dim owd As Word.Document Dim i, j As Integer Dim Rcount, Colcount As Integer Rcount = Sheets(1).UsedRange.Rows.Count Colcount = 7 Set WdApp = New Word.Application WdApp.Visible = True Set owd = WdApp.Documents.Add owd.Content.InsertAfter ("单选题") owd.Content.InsertAfter (Chr(10)) For i = 2 To Rcount owd.Content.InsertAfter (CStr(Sheets(1).Cells(i, 1)) + ". ") owd.Content.InsertAfter (Sheets(1).Cells(i, 2)) owd.Content.InsertAfter (Chr(10)) For j = 3 To 6 owd.Content.InsertAfter (Sheets(1).Cells(1, j) + ". " + CStr(Sheets(1).Cells(i, j)) + "