Forum Replies Created

  • jshick

    Reply To: Macro to search through attribute value

    Participants 0
    Replies 2
    Last Activity 5 years, 6 months ago

    I copied into Notepad first to make sure it wasn't picking up any special characters from the HTML, then I copied from Notepad into the XMetal Form Layout Tool.

    The first error I get is “Expected statement” on the first line. It apparently doesn't like // being used to denote comments. I can use a ' at the beginning of each comment line and it seems to get along with that just fine.

    The second error I get is “Expected end of statement” on the line 3, the variable definition. It seems like it doesn't like a ; at the end of each line, so I removed those.

    The third error which I can't get passed is the “invalid character” on the “while” line.

    Reply

    jshick

    Reply To: Macro to search through attribute value

    Participants 0
    Replies 2
    Last Activity 5 years, 6 months ago

    I'm getting the following error:

    Invalid character
    Source line: while(rng.MoveToElement(elemName)) {

    Reply

    jshick

    Reply To: Macro to search through attribute value

    Participants 0
    Replies 2
    Last Activity 5 years, 6 months ago

    Alright, after some time away from this, I'm back. Perhaps there is no way for me to do what I'm looking for in a macro since it doesn't seem like I can even do it using the dialog box.

    If I bring up the “Find & Replace” dialog box (ctrl+F), there are 3 tabs at the top: Text, Element, Entity. “Text” will find PCDATA within an element. I'm actually trying to find the value (r101) of an attribute (href) in a specific element (ref-callout) when in Normal or TagsOn Views. The ref-callout element doesn't actually contain any PCDATA, only attributes.

    I can switch to plain text and just search for “r101” (but it doesn't seem like I am able to restrict by element in PlainTextView) and it will cycle through all of the occurrences of “r101”. This is not ideal as I do not want the content authors to switch into PlainTextView.

    Thanks,
    Jeff

    Reply

Products
Downloads
Support