Sub 插入字圖()
Dim x As String
x = InputBox("請輸入字圖位址")
If x = "" Then Exit Sub
'x = "http://glyphwiki.org/glyph/cdp-8be9.png"
Selection.InlineShapes.AddPicture x, , , Selection.Range
Selection.MoveRight wdCharacter, 1, wdExtend
Selection.InlineShapes(1).AlternativeText = x
Selection.InlineShapes(1).Height = 12.5
Selection.InlineShapes(1).Width = 12.5
End Sub
Sub tabletext()
Dim i As Long, cha
i = 1
Selection.Tables.Add Selection.Range, 1, 2
For Each cha In ActiveDocument.Tables(1).Cell(1, 2).Range.Characters
If Asc(cha) <> 13 Then
Selection.Tables(1).Cell(i, 1).Range = cha 'ActiveDocument.Tables(1).Cell(1, 2).Range.Characters(i)
Selection.Tables(1).Cell(i, 2).Range.InlineShapes.AddPicture ActiveDocument.Tables(1).Cell(1, 1).Range.InlineShapes(1).AlternativeText
Selection.Tables(1).Cell(i, 2).Range.InlineShapes(1).Height = 12.5
Selection.Tables(1).Cell(i, 2).Range.InlineShapes(1).Width = 12.5
Selection.Tables(1).Range.Rows.Add
End If
i = i + 1
Next
End Sub
Sub tabletext1()
Dim i As Long, cha
i = 1
Selection.Tables.Add Selection.Range, 1, 2
For Each cha In ActiveDocument.Tables(1).Cell(1, 2).Range.Characters
If Asc(cha) <> 13 Then
Selection.Tables(1).Cell(i, 1).Range = cha
ActiveDocument.Tables(1).Cell(1, 1).Range.InlineShapes(1).Range.Copy
Selection.Tables(1).Cell(i, 2).Range.Paste
Selection.Tables(1).Range.Rows.Add
End If
i = i + 1
Next
End Sub