none
Identify switches in Hyperlink fieldcode using OpenXml RRS feed

  • Question

  • Hi,

    How can we identify the switches of hyperlink fieldcode using openxml. below is the sample hyperlink fieldcode which has \h as field switch but i am not able to find this switch in openxml.

    {HYPERLINK "mailto:support@business-integrity.com" \h}

    <w:hyperlink r:id="rId10">
            <w:r>
              <w:rPr>
                <w:color w:val="0000FF"/>
                <w:sz w:val="16"/>
                <w:u w:val="single" w:color="0000FF"/>
              </w:rPr>
              <w:t>support@business-integrity.com</w:t>
            </w:r>
            <w:r>
              <w:rPr>
                <w:sz w:val="16"/>
              </w:rPr>
              <w:t>;</w:t>
            </w:r>
          </w:hyperlink>

    Thanks

    Manohar


    • Edited by M_RT Monday, April 24, 2017 8:44 AM
    Monday, April 24, 2017 6:40 AM

All replies

  • Hello,

    If using your hyperlink field code with \h as switch, I cant find any information in OpenXML. I think we could not read it using open xml library.

    In fact, according to Field codes: Hyperlink field, available switches are \l \m \n \o \t.

    I test the following switches \t \n \o and could get their attributes TargetFrame\Anchor\Tooltip. For more information, please visit  Hyperlink members

    { HYPERLINK "filename" \t "_top" }
    
    <w:hyperlink w:tgtFrame="_top" w:history="1" r:id="rId4" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
      <w:r w:rsidRPr="009574A7">
        <w:rPr>
          <w:rStyle w:val="Hyperlink" />
        </w:rPr>
        <w:t>filename</w:t>
      </w:r>
    </w:hyperlink>
    
    
    { HYPERLINK "filename" \n }
    
    <w:hyperlink w:history="1" w:anchor="_blank" r:id="rId4" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
      <w:r w:rsidRPr="0023332D">
        <w:rPr>
          <w:rStyle w:val="Hyperlink" />
        </w:rPr>
        <w:t>Filename</w:t>
      </w:r>
    </w:hyperlink>
    
    { HYPERLINK "filename" \o "test" }
    
    <w:hyperlink w:tooltip="test" w:history="1" r:id="rId4" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
      <w:r w:rsidRPr="00EF19AF">
        <w:rPr>
          <w:rStyle w:val="Hyperlink" />
        </w:rPr>
        <w:t>filename</w:t>
      </w:r>
    </w:hyperlink>

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 25, 2017 3:12 AM
    Moderator