[Word] more info on failing macro problem, run-time error 4198

Margaret Berson mmb at spiritone.com
Thu Aug 21 17:33:49 CDT 2008


Hi Phil,

I know it looks as if they should sort, but Word informs me "cannot
sort field codes". It doesn't disclose why. 

I found some other relevant ideas which I'll post next.

Margaret

*********** REPLY SEPARATOR  ***********

On 8/21/2008 at 1:41 PM Phil Rabichow wrote:

>Hi Margaret:
>I can't help with the VBA aspect, but why can't you sort the field
codes.  If they
>are all hyperlink fields in the format of:
>{hyperlink "alpha"}
>{hyperlink "gamma"}
>{hyperlink "beta"}
>{hyperlink "delta"}
>
>& you select them all (with field codes showing), they should sort
as
>{hyperlink "alpha"}
>{hyperlink "beta"}
>{hyperlink "delta"}
>{hyperlink "gamma"}
>
>Maybe I'm misunderstand the situation.
>--
>Hope this helps.
>
>Phil
>To assist in maintaining the thread for others who are interested,
please post any
>follow-up question or reply in the newsgroup and not directly to
me:-)
>
>Margaret Berson wrote:
>
>> The error message is Run-time error 4198: Command failed. A
Google
>> search finds pages that talk about this problem having something
to
>> do with tables or floating objects.
>>
>> Here's what I'm trying to do. I have a file of 242 pages with
1144
>> hyperlinks. I made the hyperlinks visible as field codes,
"found"
>> all in the document and copied them into a separate file and
they
>> are visible as field codes. I cannot sort the field codes,
though.
>> So I want to copy only the text of only the hyperlink references
>> that link to bookmarks (not those that link to #_Refxxxx, or to
>> URLS); they are all alpha strings within quotes. So I search on
>> quote, any character but not 0-9, one or more occurrences,
quote.
>> No problem finding the string.
>>
>> Now in the original document, some hyperlinks are within tables,
so
>> this may have something to do with the problem. I wonder if any
>> hyperlink includes a table cell marker. Maybe that would be the
>> problem.
>>
>> Anyway, the goal is to be able to sort the list of bookmarks
>> alphabetically so I can compare it to a list of bookmarks to
>> double-check if all referenced bookmarks exist.
>>
>> Thanks,
>> Margaret





More information about the Word mailing list