本帖最后由 pipiludaxian 于 2015-2-26 09:02 编辑
Sub clte( )rem 累加串接常量
Dim mypar As Paragraph
Dim mycol As Variant
For Each mypar In ActiveDocument.Paragraphs
mycol = Left(mypar.Range.Text, Len(mypar.Range) - 1)
t = t & mycol & ","
Next
Debug.Print t
End Sub
Sub insertcolval()
Dim myary
Dim myitm
Dim mypar As Paragraph
myary = Array(wdColorGray625, wdColorGray70, wdColorGray80, wdColorGray875, wdColorGray95, wdColorIndigo, wdColorLightBlue, wdColorLightOrange, wdColorLightYellow, wdColorOliveGreen, wdColorPaleBlue, wdColorPlum, wdColorRed, wdColorRose, wdColorSeaGreen, wdColorSkyBlue, wdColorTan, wdColorTeal, wdColorTurquoise, wdColorViolet, wdColorWhite, wdColorYellow, wdColorAqua, wdColorAutomatic, wdColorBlack, wdColorBlue, wdColorBlueGray, wdColorBrightGreen, wdColorBrown, wdColorDarkBlue, wdColorDarkGreen, wdColorDarkRed, wdColorDarkTeal, wdColorDarkYellow, wdColorGold, wdColorGray05, wdColorGray10, wdColorGray125, wdColorGray15, wdColorGray20, wdColorGray25, wdColorGray30, wdColorGray35, wdColorGray375, wdColorGray40, wdColorGray45, wdColorGray50, wdColorGray55, wdColorGray60, wdColorGray65, wdColorGray75, wdColorGray85, wdColorGray90, wdColorGreen, wdColorLavender, wdColorLightGreen, wdColorLightTurquoise, wdColorLime, wdColorOrange, wdColorPink)
For Each mypar In ActiveDocument.Paragraphs
mypar.Range.Characters.Last.InsertBefore "◎" & myary(i)
i = i + 1
Next
End Sub
|