Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2695

VBA code to save pdf generated document from SAP using 'CutePDF writer'

$
0
0

Dear Community,

 

I'm currently writing a code to automate process of -
1. Uploading data from excel to SAP

2. Generate and save excel file (report) on specific folder, like desktop

3. Generate PDF report and save to specific folder.

 

Using script recorder and many useful contents given on this forum, I some how able to complete point 1 & 2. I stuck at point 3, where I'm able to generate PDF document but not able to save it on the desktop.


Below is my challange:-

Once the PDF (PrintPreview) document is generated, I need to select 'Print' button to select 'CutePDF writer' and press 'OK'.
Then the Save As window pop-up in which I need to enter path to save this pdf file.

 

Below are the snap-shot of screen your reference (these pop-up in these sequence).

PrintPreview.jpg

Print.jpg

SaveAs.jpg

session.findById("wnd[0]/tbar[1]/btn[8]").press                          ' <= This line generate PDF document (PrintPreview)

session.findById("wnd[0]/mbar/menu[0]/menu[0]").Select         ' <= after this line Print window open in which I need to select "CutePDF Writer"

 

Can some one help, how to access last two windows and select options / data I required.
Any help is much appriciated...


Viewing all articles
Browse latest Browse all 2695

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>