Need VBA Code to Add Sticky Notes to PDF!!!Very Very Urgent Please

New Here ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

Hi Team,

Can Anyone provide the sample code to AddSticky Note Annot to Existing PDF File using VBA code using Acrobat SDK(JSObject).

Thanks

Mahesh

TOPICS
Acrobat SDK and JavaScript

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

New Here , Dec 05, 2016 Dec 05, 2016
Hi Reinhard,Sorry for the late Response.Very Very Thanks for your Help..It works more than my expectations.One more time thanks for your help.Thanks & RegardsMahesh

Likes

Translate

Translate
Most Valuable Participant ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

I am sorry to report that programming with the Acrobat SDK is not about finding samples to copy/paste for your needs. Instead, it is about studying the thousands of pages of documentation and writing all the code yourself.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

Here a quick vbs/vba code. Have a look at the SDK and especially on the Acrobat JS API Reference to change it to your needs.

Good Luck, Reinhard

Path = "D:\Test.pdf"

Set App = CreateObject("Acroexch.app")
app.show
Set AVDoc = CreateObject("AcroExch.AVDoc")
Set AForm = CreateObject("AFormAut.App") 'from AFormAPI

If AVDoc.Open(Path,"") Then
    '// write some js code on a vbs variable
   js = "var annot = this.addAnnot({" &vblf _
    & "page: 0," &vblf _
    & "type: ""Text"", " &vblf _
    & "author: ""ReFran"", " &vblf _
    & "point: [100,500], " &vblf _
    & "contents: ""Call Smith to get help on this paragraph."", " &vblf _
    & "noteIcon: ""Help"" " &vblf _
    & "});"
  '//execute the js code
    AForm.Fields.ExecuteThisJavaScript js
end if

Set AForm = Nothing
Set AVDoc = Nothing
Set APP = Nothing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 05, 2016 Dec 05, 2016

Copy link to clipboard

Copied

Hi Reinhard,

Sorry for the late Response.

Very Very Thanks for your Help..

It works more than my expectations.

One more time thanks for your help.

Thanks & Regards

Mahesh

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 08, 2020 Apr 08, 2020

Copy link to clipboard

Copied

Hi,

 

Could you please share a final code (script) which will add sticky note to PDF file ?

And also name, which .dll file is needed for this script (if any) ?

 

Thanks in advance,

 

BR

M.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Apr 08, 2020 Apr 08, 2020

Copy link to clipboard

Copied

Martyna, isn't that what the code that someone generously shared already does?

You don't need any DLLs, anyone with the paid-for Acrobat Pro in Windows can use these APIs.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 08, 2020 Apr 08, 2020

Copy link to clipboard

Copied

I'm not sure, whether this is complete code or only part of them.

Futhermore there is a reference to following items:

 

  • Acroexch.app
  • AcroExch.AVDoc
  • AFormAut.App

 

From where I can get this items ? Any location on drive or it is something else ?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 08, 2020 Apr 08, 2020

Copy link to clipboard

Copied

LATEST

This items are part of Adobe Acrobat.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines