Skip to content

Instantly share code, notes, and snippets.

@Techlogist
Last active October 3, 2021 12:34
Show Gist options
  • Save Techlogist/efa3a830bfa115c5c7ec7acf5145e2e3 to your computer and use it in GitHub Desktop.
Save Techlogist/efa3a830bfa115c5c7ec7acf5145e2e3 to your computer and use it in GitHub Desktop.
How to share Outlook 2016 Quick Parts?
REM License: GNU General Public License v2.0
REM Author: Miguel
REM Website: www.techlogist.net
REM Post: https://techlogist.net/batch/how-to-share-outlook-2016-quick-parts
REM Description: This script helps users copy Quick Parts between Windows 10 computers
REM OS/Language/Region: Windows/EN-US
@echo off
title Copy Quick Parts Export
color f0
mode con:cols=70 lines=10
goto start
:start
cls
echo.
echo Copying the file.....
REM Move the directory
cd "c:\users\%username%\AppData\Roaming\Microsoft\Templates"
REM Close outlook
for /f "tokens=2" %%g in ('tasklist^|find /i "out"') do taskkill /pid %%g /f
REM Create a new folder
set _filename=Quick-Parts-Export-%username%
mkdir "c:\users\%username%\Downloads\%_filename%"
REM Copy the Normal
copy "NormalEmail.dotm" "c:\users\%username%\Downloads\%_filename%" /y
:Create
cls
REM Create the install script
set _export=c:\users\%username%\Downloads\%_filename%
echo @echo off > %_export%\Run-at-destinantion.txt
echo set _user=%%username%% >> %_export%\Run-at-destinantion.txt
echo set _current=%%CD%% >> %_export%\Run-at-destinantion.txt
echo set _fileready=%filename% >> %_export%\Run-at-destinantion.txt
echo copy "%%_current%%\%%_fileready%%" "c:\users\%%_user%%\AppData\Roaming\Microsoft\Templates" /y >> %_export%\Run-at-destinantion.txt
echo exit >> %_export%\Run-at-destinantion.txt>>%_export%\Run-at-destinantion.txt
cd %_export%
ren *.txt *.bat
start outlook.exe
:Exit
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment