Monday, 11 January 2021

How to Uninstall New Microsoft Edge in Windows 10 ? | How to get old version of Microsoft edge ?

 Below is step by step guide to uninstall the Microsoft Edge updates and get old version back :

  1. Open Cmd prompt.
  2. Cd to "C:\Program Files (x86)\Microsoft\Edge\Application".
  3. Do a 'dir' and check for your Microsoft Edge version number (you can also view it in file explorer.)
  4. Open the Edge version and Locate 'Installer' foldr inside it i.e. (C:\Program Files (x86)\Microsoft\Edge\Application\Version_Number\Installer)
  5. Make sure you at above mention path in CMD.
  6. Now hit "setup.exe --uninstall --system-level --force-uninstall" and you are done !
Let me know in comments in case you face any issue. Thanks!

Sunday, 5 January 2020

Convert DOC to PDF using python

Below is the code:

import sys
import os
import win32com.client

wdFormatPDF = 17


in_file = os.path.abspath(sys.argv[1])

out_file = os.path.abspath(sys.argv[2])

word = win32com.client.Dispatch('Word.Application')

doc = word.Documents.Open(in_file)
doc.SaveAs(out_file, FileFormat=wdFormatPDF)
doc.Close()
word.Quit()

Execute from command line :


>python doc2pdf.py test.docx test.pdf


import comtypes.client

wdFormatPDF = 17

in_file = os.path.abspath(sys.argv[1])
out_file = os.path.abspath(sys.argv[2])

word = comtypes.client.CreateObject('Word.Application')