Converting JPG to PDF using Word app scope

Hi guys.

I am converting jpg files to pdf using word application scope.
Initialy i had a problem because under temp.docx file jpg files were storing without overwriding (i mean when i run my code second time, jpg files were adding and count of jpg screens were increasing)
So decided create file at the beginning and delete it at the end.
Despite i delete a docx file when i run sequence of code second time looks like docx file remember previous run and stored screens…

Later PDF file looks liek below: but shoule contains only two screens not 4, 6,8 and so on…
image

I solved this issue:
Creating new file with DataTime in temp folder. Leter i remove folder

“temp”+System.DateTime.Now.ToString.Replace(":", “.”).Replace("/",".")+".docx"

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.