DynaPDF.ChangeLinkAnnot
-----------------------

Changes the link of a file link or web link annotation.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [5.0](newinversion50.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.ChangeLinkAnnot"; PDF; AnnotationHandle; URL ) 

**MBS**( **"DynaPDF.ChangeLinkAnnot";** /\* Changes the link of a file link or web link annotation. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$AnnotationHandle**; /\* The annotation index.e.g. 5 \*/   
**$URL**) /\* URL or file path.e.g. "http://www.mbsplugins.de/" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| AnnotationHandle | The annotation index. | 5 |
| URL | URL or file path. | "http://www.mbsplugins.de/" |

### Result

Returns OK or error.

### Description

Changes the link of a file link or web link annotation.   
The parameter AnnotationHandle must be a valid handle of a file link, page link, or web link Annotation. The parameter URL can be either a file path or an URL to an internet resource; it must not be an empty string. Note that you cannot change the type of the annotation with this function. For example, a web link annotation requires still a URL to an internet resource, while a file link annotation requires a path to a file on a local hard drive.  
Imported file link or web link annotations are mostly defined as page link annotation because it is impossible to distinguish between these types during import. Use the function [DynaPDF.FindLinkAnnot](DynaPDFFindLinkAnnot.md) if you need to change an imported file link or web link annotation.  
See also [ChangeLinkAnnot](https://www.monkeybreadsoftware.com/DynaPDF-Manual/ChangeLinkAnnot.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.FindLinkAnnot](DynaPDFFindLinkAnnot.md)
- [DynaPDF.New](DynaPDFNew.md)

### Blog Entries

- [Unlocking the Power of PDFs in FileMaker with DynaPDF and the MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2024-09-16/Unlocking_the_Power_of_PDFs_in/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 3/2019, Seite 37](https://filemaker-magazin.de/neuigkeit/4046-Appetithappen-FMM_201903)

This function checks for a license.

Created 25th November 2014 , last changed 25th November 2014

  
[DynaPDF.ChangeJavaScriptName](DynaPDFChangeJavaScriptName.md) - [DynaPDF.ChangeNamedDest](DynaPDFChangeNamedDest.md)

[HTML Version](DynaPDFChangeLinkAnnot.shtml)