• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

275
Vistas
Using VBA how do I set the font size of a field in a PDF form?

I have a pdf form and Acrobat Pro installed on my machine. In MS Access I can write VBA code to open the form and fill out the fields. But I cannot figure out how to adjust the font size of a field (or other properties like color) using VBA.

Here is a snippet:

Dim oAVDoc As Object, oPDDoc As Object
Dim oJso As Object, oFld As Object

Set oAVDoc = CreateObject("AcroExch.AVDoc")

oAVDoc.Open("C:\Temp\test.pdf", "")

Set oPDDoc = oAVDoc.GetPDDoc

Set oJso = oPDDoc.GetJSObject

Set oFld = oJso.getField("TestFieldName")

oFld.Value = "This is the new value." '<-- works fine

oFld.FontSize = 14 '<-- "Object doesn't support this property or method"
oFld.Color = "red" '<-- also does not work

I figure there are probably javascript object properties for these, but I can't find any documentation on what they might be.

Thanks in advance.

about 3 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Use
oFld.textSize = 14
instead of FontSize (see also documentation)

about 3 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda