The sample source code below will teach you how to create uri (link) action in pdf with pdf sdk in VBScript. What is ByteScout Premium Suite? It is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can help you to create uri (link) action in pdf with pdf sdk in your VBScript application.
Want to save time? You will save a lot of time on writing and testing code as you may just take the VBScript code from ByteScout Premium Suite for create uri (link) action in pdf with pdf sdk below and use it in your application. IF you want to implement the functionality, just copy and paste this code for VBScript below into your code editor with your app, compile and run your application. Use of ByteScout Premium Suite in VBScript is also described in the documentation included along with the product.
If you want to try other source code samples then the free trial version of ByteScout Premium Suite is available for download from our website. Just try other source code samples for VBScript.
' This example demonstrates how to create URI (link) action. ' Create Bytescout.PDF.Document object Set pdfDocument = CreateObject("Bytescout.PDF.Document") pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" Set comHelpers = pdfDocument.ComHelpers ' Add page Set page1 = comHelpers.CreatePage(comHelpers.PAPERFORMAT_A4) pdfDocument.Pages.Add(page1) ' Add button Set button1 = comHelpers.CreatePushButton(20, 20, 150, 25, "button1") button1.Caption = "BYTESCOUT.COM" ' Add URI action Set uriAction = comHelpers.CreateURIAction("https://bytescout.com/") button1.OnActivated = uriAction page1.Annotations.Add(button1) ' Save document to file pdfDocument.Save("result.pdf") ' Open document in default PDF viewer app Set shell = CreateObject("WScript.Shell") shell.Run "result.pdf", 1, false