none
Why does the pop-up lower case my url? RRS feed

  • Question

  • Hi all;

    If you open the file http://www.windwardreports.com/temp/Date_LowerCase.docx and hover the mouse over the date link, you will see:

    But if you open document.xml.rels, you will see the link is:

    <Relationship Id="rId7" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="wrddp:C:\test\sub_order_date.docx?WRDDP_DOCX_4932=C:\test\product_sql_2.docx&amp;props=date:1997-03-17T00\:00\:00.000;" TargetMode="External"/>
    
    

    Why is the T in the 1997-03-17T00\:00\:00.000; being lower cased to 1997-03-17t00\:00\:00.000;?

    thanks - dave

     


    The future of B.I. - Raw & Uncut
    Wednesday, August 17, 2011 4:40 PM

Answers

  • Are you creating the DOCX by building the xml directly?

    When I examine the xml after editing the hyperlink to add the screen tip, the document.xml.rels isn't changed at all, but document.xml contains this code:

    <w:hyperlink r:id="rId7" w:tooltip="wrddp:C:testsub_order_date.docx?WRDDP_DOCX_4932=C:testproduct_sql_2.docx&amp;props=date:1997-03-17T00:00:00.000;" w:history="1">

    When I reopen the saved file, it still shows the original capitalization.


    Jay Freedman
    MS Word MVP  FAQ: http://word.mvps.org
    • Marked as answer by DavidThi808 Monday, August 22, 2011 4:20 PM
    Sunday, August 21, 2011 2:11 AM

All replies

  • It's not just the t - Word converts the entire target of a hyperlink to lower case (look at the path and filename) for display purposes.
    Regards, Hans Vogelaar
    Wednesday, August 17, 2011 6:05 PM
  • But why? And that will make some urls incorrect.
    The future of B.I. - Raw & Uncut
    Wednesday, August 17, 2011 6:34 PM
  • Why? I don't have the slightest idea - the ways of Microsoft are wondrous...
    Regards, Hans Vogelaar
    Wednesday, August 17, 2011 8:47 PM
  • From a quick check it seems that Word is lower-casing everything before the first forward slash for uris with protocols it doesn't recognise. I'd have to check the rfc to be sure, but I believe this part has to be case-insensitive and, therefore, the change shouldn't matter. Why Word bothers is a harder question - it's just one of its mysterious ways.
    Enjoy,
    Tony
    www.WordArticles.com
    • Marked as answer by DavidThi808 Friday, August 19, 2011 9:46 PM
    • Unmarked as answer by DavidThi808 Friday, August 19, 2011 10:37 PM
    • Marked as answer by DavidThi808 Friday, August 19, 2011 10:37 PM
    • Unmarked as answer by DavidThi808 Friday, August 19, 2011 10:37 PM
    Thursday, August 18, 2011 12:11 AM
  • What appears in the screen tip doesn't change the URL used to follow the hyperlink. To verify this, you can open the macro editor, display the Immediate window (Ctrl+G), and enter

    Print ActiveDocument.Hyperlinks(1).Address

    The result is the URL that will be used:

    wrddp:C:\test\sub_order_date.docx?WRDDP_DOCX_4932=C:\test\product_sql_2.docx&props=date:1997-03-17T00\:00\:00.000;

    If you want to ensure that the screen tip matches the address, including capitalization, you can do that in the Insert Hyperlink dialog (or later by right-clicking the link and choosing Edit Hyperlink). Copy the contents of the Address box in the dialog, click the Screen Tip button, and paste into that box. This is the result:


    Jay Freedman
    MS Word MVP  FAQ: http://word.mvps.org
    • Proposed as answer by Calvin_GaoModerator Thursday, August 18, 2011 4:06 AM
    • Marked as answer by DavidThi808 Friday, August 19, 2011 9:46 PM
    • Unmarked as answer by DavidThi808 Friday, August 19, 2011 10:37 PM
    Thursday, August 18, 2011 12:17 AM
  • Hi;

    I tried that and changed it to wddp:/ - and not only still get the all lower case, but it inserts an additional / when getting the value. Please take a look at http://www.windwardreports.com/temp/StillAllLowerCase.docx and you will see.

    ??? - thanks - dave


    The future of B.I. - Raw & Uncut
    Friday, August 19, 2011 10:39 PM
  • Hi;

    I need to set this when I create the DOCX file. How can I do it at that point? Also, I tried editing it and it displays capitalized in the editor, but saving it still displays all lower case.

    thanks - dave


    The future of B.I. - Raw & Uncut
    Friday, August 19, 2011 10:40 PM
  • That link doesn't appear to be working, Dave.
     

    Enjoy,
    Tony
    www.WordArticles.com
    Saturday, August 20, 2011 6:56 PM
  • Are you creating the DOCX by building the xml directly?

    When I examine the xml after editing the hyperlink to add the screen tip, the document.xml.rels isn't changed at all, but document.xml contains this code:

    <w:hyperlink r:id="rId7" w:tooltip="wrddp:C:testsub_order_date.docx?WRDDP_DOCX_4932=C:testproduct_sql_2.docx&amp;props=date:1997-03-17T00:00:00.000;" w:history="1">

    When I reopen the saved file, it still shows the original capitalization.


    Jay Freedman
    MS Word MVP  FAQ: http://word.mvps.org
    • Marked as answer by DavidThi808 Monday, August 22, 2011 4:20 PM
    Sunday, August 21, 2011 2:11 AM
  • The screen tip solves it. But weird that it displays all lower case otherwise.

    thanks - dave


    The future of B.I. - Raw & Uncut
    Monday, August 22, 2011 4:21 PM