{"id":15202975,"url":"https://github.com/vaishnavi502/find-replace","last_synced_at":"2026-03-06T16:31:32.339Z","repository":{"id":173347599,"uuid":"650585620","full_name":"Vaishnavi502/find-replace","owner":"Vaishnavi502","description":"Powershell script that finds specific words in a text file and replaces them in a word document","archived":false,"fork":false,"pushed_at":"2023-06-07T12:11:59.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T22:42:36.493Z","etag":null,"topics":["automated-change","document-manipulation","docx-file","find-and-replace","ms-word","powershell","ps1-script","ps2exe","windows-powershell","word"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vaishnavi502.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-07T11:33:21.000Z","updated_at":"2023-06-07T12:17:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"36798243-0f75-463d-a24c-8e70bcffda9c","html_url":"https://github.com/Vaishnavi502/find-replace","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"e9acfd79562fb7c4a095704444b9a51cb1186ae1"},"previous_names":["vaishnavi502/find-replace"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vaishnavi502%2Ffind-replace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vaishnavi502%2Ffind-replace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vaishnavi502%2Ffind-replace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vaishnavi502%2Ffind-replace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vaishnavi502","download_url":"https://codeload.github.com/Vaishnavi502/find-replace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242005039,"owners_count":20056423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automated-change","document-manipulation","docx-file","find-and-replace","ms-word","powershell","ps1-script","ps2exe","windows-powershell","word"],"created_at":"2024-09-28T04:20:57.086Z","updated_at":"2026-03-06T16:31:32.285Z","avatar_url":"https://github.com/Vaishnavi502.png","language":"PowerShell","readme":"# Find-Replace for specific words\n## Powershell script that finds specific words in a text file and replaces them in an MS word document\u003cbr\u003e\n\n### Target group\u003cbr\u003e\n- Editors and writers\n  - Purpose: To replace commonly used phrases and words without needing to find and replace using MS Word's built-in function every time\n  - Automated replacement of words in British English to American English or vice-versa is useful through this\n  - Replacement of non-hyphenated words, use of en-dash or em-dash for certain commonly-used phrases is possible through this\n\n### About find.txt:\n* A new phrase should be of the form: {old word(s)}:{new word(s)}\n  * Note: There shouldn't be any space after the colon unless you want an extra space upon replacement\n* All occurrences of the words will be replaced in the word doc\n\n### Prerequisites:\n- Powershell script must be allowed to run as per execution policy\n  - Check that your policy is either RemoteSigned, AllSigned or Bypass\n    In case it is not, open Windows powershell using Run as Administrator and using\n    ```powershell\n    Get-ExecutionPolicy\n    Set-ExecutionPolicy -ExecutionPolicy \u003cyour preferred policy\u003e\n    ```\n- The doc file you want to modify must be closed before running findrep.exe\n\n### Steps to follow before running findrep.exe:\n1. Open findrep.ps1\n2. Find the line\n    ```powershell\n    $words=Get-Content C:\\Users\\DELL\\Desktop\\find.txt\n    ```\n   ![image](https://github.com/Vaishnavi502/find-replace/assets/68768878/185451d8-e51e-4aab-8be9-0161915fa4f8)\n   and replace the path with path to your find.txt\n    ```powershell\n    $words=Get-Content \u003cyour path\u003e\\find.txt\n    ```\n3. Now open Windows powershell and install the module ps2exe which will convert the findrep.ps1 to an .exe file\n   ![image](https://github.com/Vaishnavi502/find-replace/assets/68768878/b4be4e60-722a-4e5d-a882-f936f5283e1b)\n4. After installing ps2exe, you can now invoke it to convert findrep.ps1 to .exe:\n   ![image](https://github.com/Vaishnavi502/find-replace/assets/68768878/002b59b9-3ff2-4a32-96b7-ac09939ba2ed)\n5. Now double-click findrep.exe and you will be asked the file name in the cmd of the MS Word doc that you want to modify:\n   ![image](https://github.com/Vaishnavi502/find-replace/assets/68768878/f44d9a48-da40-4412-9305-ee5518a523d3)\n   Provide the path to the word document you want to modify\n6. Everytime changes are made to findrep.ps1 you will need to re-create the .exe file using ps2exe\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaishnavi502%2Ffind-replace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaishnavi502%2Ffind-replace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaishnavi502%2Ffind-replace/lists"}