none
Sharepoint metadata and office quickparts - hyperlinks are not appearing in the quick part list RRS feed

  • Question

  • Hi,

    I am trying to add hyperlink type SharePoint metadata field though Quick Parts but I cannot see this in the quickpart fields list? 

    Anyone's quick response in this regard will be highly appreciated.
    Monday, May 16, 2011 7:10 PM

Answers

  • Hello Peter,

    Thanks for your quick answer. This has really helped. It is working now.

    Thanks for your help.

    Regards.

    Aftab Ahmad

    • Marked as answer by Aftab Ahmad- Saturday, May 21, 2011 6:10 PM
    Saturday, May 21, 2011 6:09 PM

All replies

  • That is what I see here, although I am working with a rather old test document. The Sharepoint field appears in the Server DIP, but not in the Quick Parts Document Property list (alhtough almost all the other field types I tried do appear n both the DIP and the Document Property list)

    If it would be valuable to insert the hyperlink text, I assume that the only easy way to do it would be to use a different field type in Sharepoint; At this point I cannot even suggest whether a calculated field value woud work any better. 

    You may get more help in a Sharepoint-oriented group.


    Peter Jamieson
    Monday, May 16, 2011 9:45 PM
  • Hi Peter,

    Thank you for your answer.

    Actually I want to add hyperlink field in the document template saved in content type. As far as I understand that I have to convert the hyperlink type field to a text field and ask user to create link manually everyime they create a document from this template. Is it correct?

     

    Aftab Ahmad

    Wednesday, May 18, 2011 6:57 PM
  • Can you clarify please?

    Do you mean that the user does not actually need to be able to insert the hyperlink from the list of Document Properties?

    i.e. you want to have a hyperlink in the document, but have the link text ("Web address") and display text ("Description") updated from a Sharepoint property when a new document is created in your list?

    If so, it may be possible, but

     1. it may make a difference if you can use code when creating/opening the document. In that case, it may be possible to access the Custom XML parts that Sharepoint adds to the document, and insert a HYPERLINK field that uses the data in those parts. In that case, you would not need a copy of the hyperlink in a Sharepoint text field

     2. If you cannot use code, I think the following approach may work, but you woud need to see what actually happens when you create a new document.

    In essence,

     a. In the sharepoint list, you will need two text properties, one for the link text and one for the display text. Let's call them hllink1 and hldisplay1. For a sample document, put some text in each of these properties.

     b. in the template,

     - insert the hllink1 Document Property and the hldisplay1 Document Property. This is a temporary move that will let you change thevalues of these properties without displaying the DIP

      - insert a HYPERLINK field as follows

         - use ctrl-F9 to insert a pair of field code braces { }

         - type HYPERLINK "" between the {}, so you have

    { HYPERLINK "" }

         - then insert another copy of the hllink1 Document Property between the ""

    { HYPERLINK "the Document Property for hllink1" }

     c. select the Hyperlink field and use F9 to update it. When you show the result (Alt-F9), you should see a clickable hyperlink where the "display text" is the same as the link text

     d. Click somewhere inside the display text, and insert the hldisplay1 Document Property.

     e. Carefully select the remainder of the display text and delete it. You should stil be left with a hyperlink that can be ctrl-clicked in the usual way.

     f. Modify the texts in hllink1 and hldisplay1. However notice that, as a maximum, the hyperlink display text will update automatically. The tooltip for the hyperlink does not update automatically.

     g. Select the hyperlink and press F9 to update it. The tooltip/link text should update

     

    There are several uncertainties here, including:

     - whether that is what you need to be able to do

     - whether the user will need to update the hyperlink field when the document is opened

     - whether the Hyperlink can be deleted too easily by the user

    I cannot check this straight away, but perhaps that gives you a starting point.


    Peter Jamieson
    Thursday, May 19, 2011 8:08 AM
  • Hi Peter,

    Yes, that was the solution I needed that you have given. Thanks.

    But unfortunately this does not work in Word 2010. When you add a SharePoint field like {HYPERLINK "[hllink1]"}, press alt-F9 in document template file, save and close it. When you open it again, it does not change (there is not any field anymore to update by F9) and by pressing Alt-F9 it shows {HYPERLINK "%5bhllink1%5d"} and when you create a document from this template, it remains the same.

    Regards.

    Aftab Ahmad


    Saturday, May 21, 2011 12:43 PM
  • Before you save the file, can you

     a. open Word's Developer tab

     b. for each of the two content controls

        - select Properties

        - check "Content Control cannot be deleted"

    When I do that here (I don't think I did, before)

     c. the content control within the HYPERLINK field is not destroyed

     d. I do not see the problem that you describe.

    However,  it is possible that something else is going on as well.


    Peter Jamieson
    Saturday, May 21, 2011 4:35 PM
  • Hello Peter,

    Thanks for your quick answer. This has really helped. It is working now.

    Thanks for your help.

    Regards.

    Aftab Ahmad

    • Marked as answer by Aftab Ahmad- Saturday, May 21, 2011 6:10 PM
    Saturday, May 21, 2011 6:09 PM
  • Hi Aftab,

    I am also facing the same problem. While reopening the template its shows {HYPERLINK "%5blinkURL%5d"}.

    I have checked "Content Control cannot be deleted" property also. Hyperlink display text working file. But url field getting destroyed. Im using MS Office 2010 and Sharepoint 2010.

    Kindly let me know what you have did to solve this.

    Monday, January 18, 2016 2:01 PM
  • Hi Peter,

    I am also facing the same problem. While reopening the template its shows {HYPERLINK "%5blinkURL%5d"}.

    I have checked "Content Control cannot be deleted" property also. Hyperlink display text working file. But url field getting destroyed. Im using MS Office 2010 and Sharepoint 2010.

    Kindly let me know anything i have missed?

    Monday, January 18, 2016 2:02 PM
  • This is the only thing I can think of, but I cannot test it right now.

    One thing I discovered since this conversation started is that in .docx files, Word will destroy any fields nested within a HYPERLINK field *unless* you ensure that the HYPERLINK field text contains a Word bookmark.

    This may be why this kind of thing sometimes appears to work. If the last thing you do before saving the document is to select the text in the HYPERLINK field and/or modify or change it, there *will* be a bookmark in the field, because Word inserts a bookmark called  "_GoBack"

    I do not know whether the same thing is true for a content control nested inside the HYPERLINK field, but it must be worth experimenting. One visible way that you can insert a bookmark is to insert a { SET } field inside the hyperlink field, so you have something like this:

    { HYPERLINK "[the content control that contains the link text]{ SET mybm 1 }" }


    If you have more than one such link, you will need different bookmark names in each SET field. You can either name them manually, e.g.

    { SET mybm1 1 }
    { SET mybm2 1 }

    and so on, or you can nest a SEQ field inside to generate a number, e.g.

    { SET "mybm{ SEQ mybmnum }" 1 }

    In all the above examples, the {} must be the special field code brace pairs that you can insert in Windows Word using ctrl-F9, not the ordinary braces you can type on the keyboard.


    Peter Jamieson


    • Proposed as answer by Kailash R Monday, January 18, 2016 4:14 PM
    • Edited by Peter Jamieson Monday, January 18, 2016 4:16 PM
    Monday, January 18, 2016 3:34 PM
  • Peter,

    Thanks for your immediate response and its working fine.

    I'm trying to solve this more than 3 hours. Its really great.

    Thanks Again,

    -Kailash

    Monday, January 18, 2016 4:19 PM
  • Hi peter,

    This is a great find.

    But, I am still facing issues. Only one of the links stays intact and the other keeps breaking and changing to "%5dColumn name%5d". Even on checking "Content Control cannot be deleted", there seems to be no difference.

    Please let me know if we need to do anything different when there are more than 1 link.

    Thanks,

    Regards,

    Keerthiga

    Monday, July 10, 2017 8:26 PM
  • Hi Keerthiga,

    I'm sorry, when I last looked at this it seemed that a certain approach was possible, but either I was wrong (even then) or things have changed and this approach no longer works.

    Probably better to look for a different solution.



    Peter Jamieson

    Monday, July 10, 2017 10:48 PM
  • Thank you for your response Peter.

    Keerthiga Jayaprakash

    Wednesday, July 12, 2017 4:41 PM