C
capnhud
I have tried to use a macro in Frontpage 2003 that would allow me to when I
select a section of text it wil automatically enclose the selected text with
corresponding tags. But when I run the macro i get a runtime error 70
permission denied. Can someone tell me what I am possibly doing wrong.
here is the macro
Sub WrapSampleCode()
Dim objTxtRange As IHTMLTxtRange
Dim temp As String
' This will surround the selection
' with paragraph tags.
Set objTxtRange = ActiveDocument.Selection.createRange
temp = objTxtRange.htmlText
temp = "<p>" _
& temp & "</p>"
objTxtRange.pasteHTML temp
End Sub
select a section of text it wil automatically enclose the selected text with
corresponding tags. But when I run the macro i get a runtime error 70
permission denied. Can someone tell me what I am possibly doing wrong.
here is the macro
Sub WrapSampleCode()
Dim objTxtRange As IHTMLTxtRange
Dim temp As String
' This will surround the selection
' with paragraph tags.
Set objTxtRange = ActiveDocument.Selection.createRange
temp = objTxtRange.htmlText
temp = "<p>" _
& temp & "</p>"
objTxtRange.pasteHTML temp
End Sub