Invoke Code: Exception has been thrown by the target of an invocation(Save the work file into pdf))

Hello,

I am getting the below error in invoke code.

I want to save the text file into PDF.

No null values are passed and but still error throws.

InputFile: "C:\Users\Karthikeyan\Documents\UiPath\CSACustomerService_Dispatcher\Data\Input\MailasPDF\MailPDF.txt:

OutputFile:
“C:\Users\Karthikeyan\Documents\UiPath\CSACustomerService_Dispatcher\Data\Input\MailasPDF\MailPDF.pdf”

please help

hie @sharu_priya can you show the arguments that you are passing what value that has been holding.

cheers

Sure.

Can you try to add try catch in your code so it will give you the exact exception.and also insure that microsoft is installed in your machine where you are running the code.

cheers

Below is the input file. I think this is not the word file i guess.

Note: This code is not developed by me. So little confused

Hey @sharu_priya can you use alternate method like read word and save it to text file.


because i tried the code it working for me but it giving me some unexpected values also
which not write in the word file
cheers

1 Like

Hi Sumit,

I contacted the developer of this code.

He suspected that it might be the size of the input doc is large… so it may not get converted to PDF.

Regards,
Sharu

ohh okay @sharu_priya so better to go with the Activity provided by UiPath.because with the activity you did not face that type of issues.

cheers

Are you referring the one which you said above(Word Application scope)

@sharu_priya yes right

Hey hi sumit.

Have you worked on docu sign before or any ideas?

@sharu_priya Please write your query hope i’ll help you on that point.

Can you show the sample which part you want to check .

I have partially developed. I am strucked in the logic. If possible can we connect when you are free

ohh sorry but not able to connect it’s my working hours . :no_mouth:
@Yoichi @Anil_G @ashokkarale help you better on that.

cheers