'单选题有答案相关代码:
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)) + " ") + Chr(10)
Next j
'owd.Content.InsertAfter (Chr(10))
owd.Content.InsertAfter (Sheets(1).Cells(1, 7) + ": " + Sheets(1).Cells(i, 7))
owd.Content.InsertAfter (Chr(10))
owd.Content.InsertAfter (Chr(10))
Next i
MsgBox ("jieshu")
End Sub
'单选题无答案版代码:
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