Hyperlink in comment is not reported by Word object model

I believe this is a bug with Word.  I have verified with Word 2010 & 2013.  I did not test with any other version. 
If a hyperlink in a comment is the first thing in the comment, the Word object model does not report that there is a hyperlink in the comment.  If I modify the comment and add any text (including a space)
before the link, the link will be reported by the object model.
Steps to reproduce: 
in a document, go to Review Ribbon and select "New Comment"
type in text, select text, and insert hyperlink (Ctrl+k), in address field add http://www.google.com
Add a new macro that will loop through the comments and report if a hyperlink is found, see code below
I also verified using VSTO the same behavior
Dim doc As Document
Set doc = ActiveDocument
Dim link As Hyperlink
Dim comment As comment
For Each comment In doc.Comments
On Error Resume Next
If Not comment.Range Then
For Each link In comment.Range.Hyperlinks
MsgBox "Link found in comment"
Next link
End If
Next comment
Byron

Hi Byron,
Based on the description, you can’t detect the hyperlink in the comments if the hyperlink is at the beginning of the comment. I can’t reproduce the issue by following the steps above like figure below:
The version of Word application is like figure below:
I suggest you trying to update the Office to the latest version to see whether this issue is fixed.
Hope it is helpful.
Best regards
Fei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Usage Reporting via client object model

    Hi,
    Is there any way that I can get the site last modified date, unique visitors per month via client object model?
    Is it so that to get the site last modified date i have to loop into all lists/libraries and get the lastitemmodifieddate property?
    -Prashant

    Hi,
    I do not think CAML Query object creation is required here because we directly get the lastitemmodifieddate property for the list. For e.g. like this and then do some operation on the date to get the recent date.
    ClientContext context = new ClientContext("http://server1/sites/TeamSite");
    Web oWeb = context.Web;
    context.Load(oWeb.Lists, lists => lists.Include(list => list.LastItemModifiedDate));
    context.ExecuteQuery();
    foreach (List list in oWeb.Lists)
    //string oTitle = list.Title;
    DateTime _lastModifiedDate = list.LastItemModifiedDate;
    -Prashant

  • Adding Quick Parts Programmatically Using Word Office Model

    I need to add Document ID Value quickpart to a very large number of existing documents and I would like to make a program to do so.  I'm afraid googling the issue has left me a little confused.  As far as I can tell, the rough form of the footer-insertion
    part of the solution (in C#) looks something like this:
    Word.Application iWord = new Word.Application();
    Word.Document iDoc = iWord.Documents.Open(savePath);
    foreach (Word.Section wordSection in iDoc.Sections)
    Word.Range footerRange = wordSection.Footers[Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range;
    footerRange.DoSomething()
    iDoc.Save();
    But I can't seem to figure out the details of DoSomething().  
    Please note that it must be the dynamic field, equivalent to Design->Quick Parts->Document Property->Document ID Value, not simply text.
    Thanks!

    The quickparts listed in the Document Property dropdown are either the standard ones (corresponding to standard builtin document properties such as Author), the "newer" Cover Page ones, or columns in a SharePoint document library. (If yours is
    something else, please let us know).
    So I assume that yours is a "SharePoint column." If not, the rest of this message is unlikely to help.
    If so, there is no simple facility in the Word Object Model to replicate exactly what happens when you insert that quick part from the Document Property menu. To do it in code, you have to 
     a. insert the right kind of content control (probably a plain text one in this case) and give it a suitable Title/Tag
     b. connect it to the correct element in the Custom XML data store.
    I have the starting point of some VBA code for that (see below). You'd obviously need to adapt it for C# and to insert at a range rather than the selection.
    The only other aproach I know would be
     a. manually insert a copy of the content control that you want and adjust its properties as required
     b. make a copy of that somewhere where you can retrieve and use it programmatically (e.g. create a new building block/glossary entry or some such)
     c. programmatically insert that wherever you need it
    However, in that case, you will need to be sure that the same namespace GUID is used for the property in all your documents. If, for example, someone has created a separate "Document ID" column in a number of different document libraries, each
    Document ID may have a different namespace GUID. If the Document ID column is a site column and all the documents are on the same site or have come from the same site, they may share a namespace GUID. 
    FWIW the code I have for getting Xpath and value information given a property name is as follows. It was orignally written to try to deal with a particular
    type of property that I hope you don't have to deal with :-)
    Sub TESTinsertCC()
    ' Put a property name in here instead of "col1text" and see if you
    ' get a viable Content Control at the Selection
    Debug.Print insertCC(Selection.Range, "col1text").XMLMapping.XPath
    End Sub
    Function insertCC(theRange As Word.Range, ContentTypeItemName As String) As ContentControl
    'Dim cc As Word.ContentControl
    Set insertCC = theRange.ContentControls.Add(wdContentControlText)
    With insertCC
    .XMLMapping.SetMapping getDIPPropXPath(theRange.Document, ContentTypeItemName)
    End With
    'Set cc = Nothing
    End Function
    Function getDIPPropXPath(TheDocument As Word.Document, _
    ContentTypeItemName As String) As String
    ' Attempts to retrieve the display value of a ContentTypeProperty that
    ' cannot be returned directly using the MetaProperty.Value property
    ' TheDocument is the Word document containing the properties
    ' ContentTypeItemName is the displayName of the item
    ' Assume we cannot get this item from the MetaAttribute Value
    ' because VBA does not recognise the Variant Type or content
    ' Two ways we could do it:
    ' a. get the Custom XML Part that contains the data and iterate
    ' through the nodes until we find the one we need.
    ' b. get the Custom XML part the contains the schema(s) and
    ' retrieve the XML Element name and Namespace name, then
    ' get the Custom XML part that contains the schema(s) and
    ' retrieve the 1st sub-element of the element.
    ' This attempts (b). Lots of assumptions, including
    ' - the namespace name of the schema and data parts are fixed
    ' and there is either only one Custom XML Part with that
    ' name or the first one is the one we want
    ' - the leaf element of the first sub-branch of the element
    ' But there are assumptions in (a), too, e.g. that there
    ' aren't two complex items in the DIP with the same name but
    ' different namespaces.
    ' Can almost certainly be improved by inspecting the other
    ' properties in the schema to identify precisely which type
    ' of property we are dealing with. Unfortunately, even this does
    ' not appear to be reliably available from the COntentTypeProperties
    ' info.
    Const SchemaPartNamespaceURI As String = _
    "http://schemas.microsoft.com/office/2006/metadata/contentType"
    Const DataPartNamespaceURI As String = _
    "http://schemas.microsoft.com/office/2006/metadata/properties"
    ' Do everything step by step for explanation and debugging
    Dim cxnDataElement As Office.CustomXMLNode
    Dim cxnsDataElement As Office.CustomXMLNodes
    Dim cxnSchemaElement As Office.CustomXMLNode
    Dim cxnsSchemaElement As Office.CustomXMLNodes
    Dim cxpData As Office.CustomXMLPart
    Dim cxpSchema As Office.CustomXMLPart
    Dim cxpsData As Office.CustomXMLParts
    Dim cxpsSchema As Office.CustomXMLParts
    Dim strDataXPath As String
    Dim strElementName As String
    Dim strElementNamespaceURI As String
    Dim strPrefix As String
    Dim strResult As String
    Dim strSchemaXPath As String
    Debug.Print "TheDocument: " & TheDocument.FullName
    Debug.Print "ContentTypeItemName: " & ContentTypeItemName
    strResult = ""
    Set cxpsSchema = TheDocument.CustomXMLParts.SelectByNamespace(SchemaPartNamespaceURI)
    If cxpsSchema.Count = 0 Then
    MsgBox "Error: Schema CXP not found or does not have the expected Namespace URI"
    Else
    If cxpsSchema.Count > 1 Then
    Debug.Print "Warning: more than one CXP with the expected Schema Namespace URI." & _
    " Using the first."
    End If
    Set cxpSchema = cxpsSchema(1)
    'Debug.Print cxpSchema.XML
    strSchemaXPath = "//xsd:element[@ma:displayName='" & ContentTypeItemName & "']"
    Debug.Print "Schema XPath: " & strSchemaXPath
    Set cxnsSchemaElement = cxpSchema.SelectNodes(strSchemaXPath)
    If cxnsSchemaElement.Count = 0 Then
    MsgBox "Error: Could not find the schema element that defines the element."
    Else
    If cxnsSchemaElement.Count > 1 Then
    Debug.Print "Warning: more than one Schema Element that defines the element."
    End If
    Set cxnSchemaElement = cxnsSchemaElement(1)
    ' don't test for node existence at this point
    'Debug.Print cxnSchemaElement.XML
    strElementName = cxnSchemaElement.SelectSingleNode("@name").Text
    Debug.Print "Actual Element Name: " & strElementName
    strElementNamespaceURI = cxnSchemaElement.ParentNode.SelectSingleNode("@targetNamespace").Text
    Debug.Print "Element Namespace URI: " & strElementNamespaceURI
    Set cxnSchemaElement = Nothing
    End If
    Set cxnsSchemaElement = Nothing
    Set cxpSchema = Nothing
    ' Now look for the item in the Custom XML part that contains the data
    Set cxpsData = TheDocument.CustomXMLParts.SelectByNamespace(DataPartNamespaceURI)
    If cxpsData.Count = 0 Then
    MsgBox "Error: Data CXP not found or does not have the expected Namespace URI"
    Else
    If cxpsData.Count > 1 Then
    Debug.Print "Warning: more than one CXP with the expected Data Namespace URI." & _
    " Using the first."
    End If
    Set cxpData = cxpsData(1)
    'Debug.Print cxpData.XML
    ' Get the prefix for the Element's namespace.
    ' Note that this may be different from any prefix
    ' you may see if you inspect the Part's XML
    strPrefix = cxpData.NamespaceManager.LookupPrefix(strElementNamespaceURI)
    Debug.Print "Data Prefix: " & strPrefix
    ' retrieve any elements with that prefix and the internal XML
    ' property name
    ' not sure this "if" is ever needed or would be effective
    If strPrefix = "" Then
    strDataXPath = "//" & strElementName
    Else
    strDataXPath = "//" & strPrefix & ":" & strElementName
    End If
    Debug.Print "Data XPath: " & strDataXPath
    Set cxnsDataElement = cxpData.SelectNodes(strDataXPath)
    If cxnsDataElement.Count = 0 Then
    MsgBox "Error: Could not find the data element."
    Else
    If cxnsDataElement.Count > 1 Then
    Debug.Print "Warning: more than one Data Element. Using the first."
    End If
    Set cxnDataElement = cxnsDataElement(1)
    ' May need to drill down further
    'Debug.Print cxnDataElement.XML
    While cxnDataElement.HasChildNodes
    Set cxnDataElement = cxnDataElement.FirstChild
    Wend
    strResult = cxnDataElement.Text
    Set cxnDataElement = Nothing
    End If
    Set cxpData = Nothing
    Set cxnsDataElement = Nothing
    End If
    Set cxpsData = Nothing
    End If
    Set cxpsSchema = Nothing
    'getDIPPropValue2 = strResult
    getDIPPropXPath = strDataXPath
    End Function
    Peter Jamieson

  • Apex Advisor does not like comments within interactive reports

    If I have some comments within interactive reports,
    example:
    /* comment */
    select * from dual
    apex advisor shows me an error message like this:
    Compilation error - ORA-06550: line 3, column 1:
    PLS-00428: an INTO clause is expected in this SELECT statement
    Does anyone has the same problem?
    Thank you!

    Hi "user1139516",
    the problem is that if the first word isn't "SELECT" or "WITH" the statement it's not detected as a SQL statement and we fallback to try to handle it as an anonymous PL/SQL block.
    For now as a workaround, but your comments after the SELECT keyword like
    select /* comment */
      from dualWe try to change that behavior in a future version of APEX.
    Thanks
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Hyperlinks not converting from Word to PDF

    I've read the other discussions regarding this topic & the solutions don't seem to work for me. I'm using Word '07 converting to Acrobat 8. Some of my hyperlinks will convert but not all. AND, one hyperlink is linking wrong in Acrobat even though it's correct in Word. I've checked my preferences in Word & Acrobat - all the right things are checked. I've tried creating it from Word & from Acrobat & nothing is working.
    Can anybody ease my frustation? Please?!
    Thank you.

    Please repost in the Acrobat forum.

  • Error occured when try to open the BI report from words (template builder)

    Hi,
    After i LogOn into BI Publisher thru words, successful. But when choose a report to open, error returned as "Error occured. Please check the settings and try again."
    My team had do various of testing, try to reinstall the BI publisher desktop, but not able solve the problems. From the forum, someone comment is due to data loaded too large, so we try to put a query which only select single record from a small database, but still same error.
    then we suspect is due to the proxy setting, because once i reset to bypass the proxy, i able to open the report thru words without any error.
    i found this comment from online doc :
    Have set up the proxy parameters (to avoid any firewall problems with the Web Services and RSS data set reports) in the xmlpserverstart.bat file or the oc4j.cmd file as per your installation.
    Modify the following line, which defines JAVA_HOME. (Observe the proxy parameters in bold.):
    •     "%JAVA_HOME%\bin\java" %JVMARGS% -jar -Dhttp.proxyHost= <myproxy.mycompany.com> -Dhttp.proxyPort=<Port> "%OC4J_JAR%" %CMDARGS%
    Restart xmlpserver or oc4j as the case may be.
    but i can't found this xmlpserverstart.bat or oc4j.cmd from server.
    Please comment.
    Thanks
    Regards
    Eelyn

    hi,
    as per you query posted here, please chk ur sql statement what u had written...there may be some problem with that query that is y ur getting the below error.
    "error occured. please check the settings and try again BI publisher"
    regards
    Kanoj

  • How to create rtf template to view report in Word and Excel, with numeric f

    Hi,
    Please help me!
    How to create rtf template to view report in Word and Excel, with numeric formatted fields (like this 999 999 999,99 with spaces between numbers) and then end user be able to process those fields with Excel tools (sum, etc).
    Thank you.

    From what I have seen Excel can not handle 999 999 999.00. You can use 999999999.00 and then format it as you want in the xls bt you can not have values like 999 999 999.00 coming from publisher output and have functions on the values in Excel
    Tim

  • CANNOT OPEN HYPERLINK IN ADOBE DOC ORIGINALLY CREATED IN WORD

    Our office creates documents in WORD, which includes a website link. These documents are then converted to pdf. Until recently, we had no problem clicking on the link in the Adobe document to access the website. All of a sudden, however, the link in the pdf file doesn't work (doesn't go anywhere; even if you right click and ask it to open the link). It works fine in the word document. I've noticed that the hand symbol in the pdf file now has a "W" symbol over it and am guessing that this is telling me what the problem is, but have no idea how to fix it.
    Thanks for any help you can offer.

    I had a similar problem. I could not open a word hyperlink which pointed to a pdf file on a network share. To cut a long story short I uninstalled acrobat professional (writer) Then opened the hyperlink successfully by manually pointing it to acrobat READER. You can then re install adobe acrobat pro. I did have acrobat reader as the default program to open .pdf files but for some reason im unsure of it was still using the wrong software. Hope this helps any poor souls having the same problem i had.

  • Exporting report to Word, Word editable or RTF adds page breaks

    Our workforce management software (Aspect Workforce Management) uses Crystal 2008 for customer reports.  Previewing, printing, and exporting to HTML, PDF, and Excel all work fine but exporting the report to Word, Word Editable, and RTF results in a document that contains extra page breaks in the middle of pages or other strange paging behavior.
    With the regular Word export and the RTF export we see some pages containing the first half of the page at the top of a page followed by a break then the second half of the page on the next page at the bottom of the page.  E.G., lots of empty whitespace at the bottom of a page followed by lots of empty whitespace at the top of the next page which ends with content that should have been at the bottom of the previous page.
    The Word Editable export doesn't seem to insert weird page breaks but every page says 1 of N as the page number in the footer.  Other export formats number the pages correctly.
    Our customers are demanding a fix for this problem, which seems to be a Crystal defect.  I don't understand why PDF and HTML and Excel all page correctly but not Word, Word Editable, or RTF.  How hard is it to generate the export without causing extra page breaks or incorrectly numbered pages?
    Is this problem acknowledged by SAP to be defect in the word, word editable, and rtf export options?  Is SAP intending to fix this problem?
    John Hansen

    And good morning to you too John:
    So, if you wrote the code your self and it is in .NET, why was the issue posted to the SAP Crystal Reports Design forum rather than the .NET - SAP Crystal reports forum? Note that each forum as a nice description in the header as to what sort of questions should be posted in that forum. In light of you posting the issue to the SAP Crystal Reports Design forum, I feel it was a pretty fair to ask the questions I did ask... (?).
    I feel that the way this communication is going, it may be a good idea if you do a bit of searching on these forums. Also, use the search box at the top right corner of this page (it will give you results for KBases, blogs, wikis, articles and more...)
    If you do not get what you need from that, it will be best for you to create a phone case here:
    http://store.businessobjects.com/store/bobjamer/en_US/pd/productID.98078100?resid=S6I@hgoHAkEAAGsiyVkAAAAR&rests=1282226845369
    Note that if what you report is deemed to be a bug in the CR designer or the CR SDK, your phone case will be refunded.
    Regards
    - Ludek

  • IDCS3: Why Does DOCX Import Not Preserve Internal Word Links?

    I have the task of importing Word docs into InDesign/InCopy such that Word-defined internal links are accurately reflected in InDesign. CS3 does a pretty good job of importing .docx files from a formatting standpoint, but it doesn't preserve internal links (e.g., Word hyperlinks that point to Word bookmarks).
    Looking at how hyperlinks are represented in ID/IC and how they're represented in Word I can't see any obvious reason why InDesign wouldn't be able to preserve them: there appears to be a good match between the two formats (Word bookMark maps to ID named anchor, Word hyperlink to a bookmark maps to ID hyperlink to a bookmark). Word bookMarks have a lot of potential complexity for other things (e.g., expressions and formulas), but that's no reason to simply discard or ignore all bookmarks and links. At least that's my initial analysis--I can't claim to have thought through the problem is as great a depth as the ID implementors have.
    I can implement the processing on the Word end to produce something I can then process in InDesign to reconstitute the links, but I'd rather not have to if InDesign can do it for me.
    Anyway, just curious.
    Thanks,
    Eliot

    Per previous discussion here: I'm importing book text from Word docs into InDesign text that does not have complicated tables or tabbing but has footnotes and a lot of italic, bold italic, and bold text. / My impression is that the best way to import text using InDesign's Place command is to keep it simple and select 'Remove styles and formatting' and 'Preserve Local Overrides' under 'Formatting'. This seems the best guarantee that italic, bold, and bold italic line-level styling in the Word doc will be preserved. / But as to retaining paragraph styling of, say, indented quotes, this then gets lost. Is there any particular way text should be paragraph-styled in the Word doc, to enhance what comes over into InDesign? (I noted that it seems best not to base Word paragraph styles on 'Normal', for instance.) I'm hesitant to ask this, since using InDesign's Place > 'Preserve styles and formatting from text and tables' import option seems to lead to lots of messy complications. Anyway, I need to preserve the line-level italic and bold styling if nothing else.

  • Building reports into word document from web application

    Is there any package that allows easy report generation into microsoft word from any part of ur application.
    thank yuo

    Microsoft Word uses a proprietary format that doesn't play well with others. You may try looking at Jakarta POI if you truly need a Word document, but I'm not sure their Word conversions are as advanced as the Excel.
    Good luck.
    P.S. UR information

  • Commenting functionality not available when I open a pdf in air application

    commenting functionality not available when I open a pdf in
    air application. Adobe documentation says that is expected with
    adobe air 1.0 but I still have the same problem even if I use the
    latest air runtime

    Back up all data.
    In the Finder, select Go ▹ Go to Folder from the menu bar, or press the key combination shift-command-G. Copy the line of text below into the box that opens, and press return:
    /Library/Internet Plug-ins
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    I've seen an unconfirmed report that the "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you might need to remove it as well, if applicable.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • Adding comments in WebIntelligence Reports like in MS Excel

    We developed a new add-on based on WebIntelligence Extension Points that allows users to create comments in WebIntelligence reports (DHTML view) a bit like in Excel.
    You can download at this address : Link: http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/30ccb607-d19b-2d10-f38a-c2413d8d9523
    More details from the blog entry : Link: /people/romaric.sokhan/blog/2010/09/12/creating-comments-in-your-webintelligence-report-like-in-ms-excel
    We hope this will encourage the development of other extensions from the SDN community
    Let us know what you think about this one
    Romaric

    Hi,
    Writing comments is goog practice in programming.
    There is no impact on the comments are added to packages.
    The perpormance of the application not dependent on the comments.
    Use below comments
    --For singe line
    /*..Multi line..*/
    Ar runtime Oralce ignore comments.

  • Comments are not displaying normally (Ref: TA-20964)

    Status: Investigating
    Affects: Some users
    Description: Users have been reporting that their comments are not displaying and have been replaced with a Tagged TOS image.
    We're currenly working to resolve this issue to get your comments back up as normal. Thank you all for your patience!
    Please feel free to Contact Us to report this issue or you can click 'Me Too' on this post to let us know.

    Win 7.
    I see the entire page here in IE9, IE8 (Compatibility View), Firefox and Chrome.

  • Need Comments in FRS report

    Hi,
    My client needs last column in the report as "Comments", where the users can provide explanations for the numbers in the report. Let me know, if there is a way that users can type their comments in a report.
    We also have a comment dimension, which has been provided for "to provide explanations", is their a way to use this Dim, so that users are able to write comments on the report, while generating it.
    I really do not know of any such functionality in FRS, if anyone knows about it, let me know.
    Thanks!

    Any ideas on being able to input comments during run time of report in FRS?

Maybe you are looking for

  • Error While Downloading to PDF from WAD Template

    Hi, We're having a problema when we're trying to download to PDF from a WAD Template. We use the same functionality to download to Excel butt here we have no problem. When we press the button to Download from PDF we get the following message: Initial

  • Can I use JDeveloper 10.1.2 in Oracle database 9.2.0.6?????

    Hi everyone. I have a web service client stub developed in JDeveloper 10.1.2. The service works well in Oracle 10g R1 (10.1.0.2.0) and Oracle 10g R2 (10.2.0.1.0). Im trying to get it working also in Oracle 9.2.0.6. It has installed java version "1.2.

  • Steps to retrieve attachments from a storage system linked via ArchiveLink.

    Dear experts, I want to retrieve the documents stored in a storage system linked to SAP via the archivelink and show it in a webdynpro application(Adaptive RFC).I need to know the right approach to do so.I am searching for a funtional module which ca

  • Keywords not appearing in Windows

    A quick google search has revealed that this is a pretty common problem - Keywords created in Aperture don't show up in Windows programs. But the why of it is a little difficult to wrap my brain around. Here's the workflow: I'm scanning a bunch of im

  • Can anyone recommend an app for downloading bank statements (.csv/.qif) directly on to my iPad

    Can anyone recommend an app for downloading bank statements (.csv/.qif) directly on to my iPad that will allow me to analyse my money flow....no account management needed. I just need something v simple that can take my statement and produce graphs e