Convert .ppt, .xls, .doc to PDF using Blue Prism ?

Lalithkumar

New Member
I happened to install the pdf add-in on my machine and used the below code to generate the pdf.

- Create a new object action inside the Ms Excel VBO and have the Start and Code stages as below. I made a duplicate copy of the Open Workbook stage and used it.
View attachment 2389

- Start stage Input parameters:
View attachment 2387

- Code stage Input parameters:
View attachment 2386

- Code stage:
View attachment 2388
Code:
Dim wb as Object = GetInstance(handle).Workbooks.Open(filename)
wb.Activate()  'can skip this line
wb.ExportAsFixedFormat (Type:=0, Filename:=FullPdfFilePath, Quality:=0) '0:=xlTypePDF, 0:=xlQualityStandard
'Refer other list of parameters in below link
'https://docs.microsoft.com/en-us/office/vba/api/excel.workbook.exportasfixedformat
wb = Nothing

- Input Excel File (Sheet1) and Process Diagram:
I have used the 'Open Workbook' action in the diagram to 'Show' the workbook, you may skip that if you don't need to display.
View attachment 2385

- Call to the new action from the Process diagram:
View attachment 2390

- Sample Output.pdf (opened in Chrome):
Page 1 from Sheet 1:
View attachment 2391

Page 2 from Sheet 2:
View attachment 2392


Hi VJR ,
I followed the same steps given same inputs and outputs still I am facing error like "the given key not presented in dictionary".I used same 3 lines code only,

its important can you please help me to resolve it
 

Lalithkumar

New Member
I happened to install the pdf add-in on my machine and used the below code to generate the pdf.

- Create a new object action inside the Ms Excel VBO and have the Start and Code stages as below. I made a duplicate copy of the Open Workbook stage and used it.
View attachment 2389

- Start stage Input parameters:
View attachment 2387

- Code stage Input parameters:
View attachment 2386

- Code stage:
View attachment 2388
Code:
Dim wb as Object = GetInstance(handle).Workbooks.Open(filename)
wb.Activate()  'can skip this line
wb.ExportAsFixedFormat (Type:=0, Filename:=FullPdfFilePath, Quality:=0) '0:=xlTypePDF, 0:=xlQualityStandard
'Refer other list of parameters in below link
'https://docs.microsoft.com/en-us/office/vba/api/excel.workbook.exportasfixedformat
wb = Nothing

- Input Excel File (Sheet1) and Process Diagram:
I have used the 'Open Workbook' action in the diagram to 'Show' the workbook, you may skip that if you don't need to display.
View attachment 2385

- Call to the new action from the Process diagram:
View attachment 2390

- Sample Output.pdf (opened in Chrome):
Page 1 from Sheet 1:
View attachment 2391

Page 2 from Sheet 2:
View attachment 2392


Once again can you please post the code
 

VJR

Well-Known Member
Once again can you please post the code
Not sure which code you are suggesting to re-submit. The full code is the one that is in this post. No other changes made. Share your screenshots of full diagram with input and outputs of all stages.
 

Lalithkumar

New Member
Hi VJR,
I'm getting this error while running the processs "Internal : Could not execute code stage because exception thrown by code stage: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))"
and correct me if i'm wrong...
 

Attachments

  • MS Excel VBO Duplicate - Save as PDF Code.PNG
    23.4 KB · Views: 15
  • Code Stage-Input.PNG
    27.2 KB · Views: 14
  • Code Stage.PNG
    29.1 KB · Views: 11
  • Process Diagram.PNG
    8.8 KB · Views: 12
  • Process Action Stage - Input.PNG
    18.7 KB · Views: 10
  • 1545732671593.png
    26.5 KB · Views: 11

mmanasa2525

New Member
I happened to install the pdf add-in on my machine and used the below code to generate the pdf.

- Create a new object action inside the Ms Excel VBO and have the Start and Code stages as below. I made a duplicate copy of the Open Workbook stage and used it.
View attachment 2389

- Start stage Input parameters:
View attachment 2387

- Code stage Input parameters:
View attachment 2386

- Code stage:
View attachment 2388
Code:
Dim wb as Object = GetInstance(handle).Workbooks.Open(filename)
wb.Activate()  'can skip this line
wb.ExportAsFixedFormat (Type:=0, Filename:=FullPdfFilePath, Quality:=0) '0:=xlTypePDF, 0:=xlQualityStandard
'Refer other list of parameters in below link
'https://docs.microsoft.com/en-us/office/vba/api/excel.workbook.exportasfixedformat
wb = Nothing

- Input Excel File (Sheet1) and Process Diagram:
I have used the 'Open Workbook' action in the diagram to 'Show' the workbook, you may skip that if you don't need to display.
View attachment 2385

- Call to the new action from the Process diagram:
View attachment 2390

- Sample Output.pdf (opened in Chrome):
Page 1 from Sheet 1:
View attachment 2391

Page 2 from Sheet 2:
View attachment 2392
Hi VJR, This Code stage of Export PDF was working for me perfectly fine but suddenly getting the below error from couple of days. Do I need to change anything on code stage?
. I am getting the POP telling - "document not saved. the document may be open or error might have occurred during saving to PDF" Do I need to change the code stage? or any other setting to be changed? Office 365 update will have any impact on this?
 

PeytonB

New Member
What are the price ranges for Blue Prism? I used Converter365 ppt to pdf online converter so far and I had no problems with it. Ever.
I would also add that you should pick a converter for the type of work that you need the conversion for.
 
Top