Sean
Guest
|
Posted:
Wed Dec 29, 2004 7:38 pm Post subject:
deleting hyperlinks |
|
|
Hi all:
I am using vba to add hyperlinks to block objects. It works great. Now, I am
trying to make a simple button that will make a selectionset of all blocks
and then Delete any and all hyperlinks. Here is what i have so far, but it
is not working. Any ideas? Thanks. Sean
Dim ss As AcadSelectionSet
Dim intCode() As Integer
Dim varCodeValue() As Variant
Dim objBlock As AcadBlockReference
Dim Hyperlinks As AcadHyperlinks
Dim Hyperlink As AcadHyperlink
Set ss = CreateSelectionSet
ReDim intCode(0)
ReDim varCodeValue(0)
intCode(0) = 2
varCodeValue(0) = "p-label-size"
ss.Select acSelectionSetAll, , , intCode, varCodeValue
For Each objBlock In ss
On Error Resume Next
Set Hyperlinks = objBlock.Hyperlinks
Hyperlink.delete
Next
|
|
Ed Jobe
Guest
|
Posted:
Wed Dec 29, 2004 9:09 pm Post subject:
Re: deleting hyperlinks |
|
|
You set the Hyperlinks object but not the Hyperlink object. You have to
iterate the Hyperlinks collection.
--
----
Ed
----
"Sean" <span@hello.com> wrote in message news:41d2c171_3@newsprd01...
| Quote: | Hi all:
I am using vba to add hyperlinks to block objects. It works great. Now, I
am
trying to make a simple button that will make a selectionset of all blocks
and then Delete any and all hyperlinks. Here is what i have so far, but it
is not working. Any ideas? Thanks. Sean
Dim ss As AcadSelectionSet
Dim intCode() As Integer
Dim varCodeValue() As Variant
Dim objBlock As AcadBlockReference
Dim Hyperlinks As AcadHyperlinks
Dim Hyperlink As AcadHyperlink
Set ss = CreateSelectionSet
ReDim intCode(0)
ReDim varCodeValue(0)
intCode(0) = 2
varCodeValue(0) = "p-label-size"
ss.Select acSelectionSetAll, , , intCode, varCodeValue
For Each objBlock In ss
On Error Resume Next
Set Hyperlinks = objBlock.Hyperlinks
Hyperlink.delete
Next
|
|
|