ByteScout PDF SDK - VBScript and VB6 - Create PDF Form with ComboBox - ByteScout

ByteScout PDF SDK – VBScript and VB6 – Create PDF Form with ComboBox

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VBScript and VB6 – Create PDF Form with ComboBox

How to create PDF form with combobox in VBScript and VB6 and ByteScout PDF SDK

Write code in VBScript and VB6 to create PDF form with combobox with this step-by-step tutorial

This sample source code below will demonstrate you how to create PDF form with combobox in VBScript and VB6. ByteScout PDF SDK is the library for pdf documents generation, modification and updates. Can also generate and fill PDF forms. Provides support for text (fonts, style, size, font family), layers, pdf form fields, vector and raster drawings and you can use it to create PDF form with combobox with VBScript and VB6.

Fast application programming interfaces of ByteScout PDF SDK for VBScript and VB6 plus the instruction and the code below will help you quickly learn how to create PDF form with combobox. In order to implement the functionality, you should copy and paste this code for VBScript and VB6 below into your code editor with your app, compile and run your application. Enjoy writing a code with ready-to-use sample VBScript and VB6 codes.

You can download free trial version of ByteScout PDF SDK from our website to see and try many others source code samples for VBScript and VB6.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

ComboBoxes.vbs
      
' This example demonstrates how to create and decorate comboboxes. ' 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 dropdown box (not editable combobox) Set comboBox1 = comHelpers.CreateComboBox(20, 20, 150, 25, "comboBox1") comboBox1.Font.Size = 12 comboBox1.BorderColor = comHelpers.CreateColorRGB(0, 0, 128) comboBox1.BackgroundColor = comHelpers.CreateColorRGB(220, 220, 255) comboBox1.BorderWidth = 2 comboBox1.Text = "Select item" comboBox1.Items.Add("Item 1") comboBox1.Items.Add("Item 2") comboBox1.Items.Add("Item 3") page1.Annotations.Add(comboBox1) ' Add editable combobox Set comboBox2 = comHelpers.CreateComboBox(20, 50, 150, 25, "comboBox2") comboBox2.Editable = True comboBox2.Font.Size = 12 comboBox2.BorderColor = comHelpers.CreateColorRGB(0, 128, 0) comboBox2.BackgroundColor = comHelpers.CreateColorRGB(220, 255, 220) comboBox1.BorderWidth = 2 comboBox2.Text = "Editable ComboBox" comboBox2.Items.Add("Item 1") comboBox2.Items.Add("Item 2") comboBox2.Items.Add("Item 3") page1.Annotations.Add(comboBox2) ' 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

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next