Share via

InfoPath programatically displaying a hyperlink from a string

Anonymous
2012-01-25T16:49:03+00:00

I have code the uses the open file dialogue to allow a user to select a file and grab the URI.

When displaying the file URI in the form I would like to display a hyperlink.

I was thinking of using HTML to create the hyperlink in the form <href=", but I did not know if there was a better way or how to build the html in code correctly.

Microsoft 365 and Office | Install, redeem, activate | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2012-01-26T18:26:51+00:00

Are you sure you are using the proper control to display the Hyperlink?  You have two options:

  • Go to the Insert tab --> Hyperlink and then bind the values to the proper fields
  • Go to the Home tab --> Controls gallery --> Hyperlink and then bind the values to the proper fields.

Sounds like you may have an anyURI field, but this doesn't ensure that it will display as a hyperlink.

Hopefully that works for you!

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2012-01-26T15:44:42+00:00

    It is already a hyperlink field.  When loaded into the field on the form it appears as plain text.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2012-01-26T14:39:48+00:00

    For this, you should simply use a Hyperlink control in your form.  Set the URL to some field in your data source, and set the hyperlink control to use that field as its source.  As simple as that!

    Was this answer helpful?

    0 comments No comments