不会吧,看看我的最新学习成果:
FrontPage2000,菜单--工具--宏--VB
Public Sub As_Keyword()
'显示选择的文本
If ActiveDocument Is Nothing Then
MsgBox "Sie müssen zuerst ein Dokument ?ffnen.", _
vbOKOnly Or vbExclamation
Exit Sub
End If
With ActiveDocument
Dim keyword As String
keyword = Trim(.selection.createRange.Text)
If keyword = "" Then
MsgBox "No selection Text!", _
vbOKOnly Or vbExclamation
Else
MsgBox Trim(.selection.createRange.Text)
Exit Sub
End If
If .all.tags("META").Item("KEYWORDS") Is Nothing Then
.all.tags("HEAD")(0).insertAdjacentHTML _
"BeforeEnd", "<meta name=""Keywords"" content=""" & _
keyword & """>"
Else
.all.tags("META").Item("Keywords").setAttribute _
"content", .all.tags("META").Item("Keywords"). _
getAttribute("content") & ", " & keyword
End If
End With
End Sub
知识需要不停的更新...........
[此贴子已经被作者于2005-8-27 21:35:25编辑过] |