cwise24 / contactAndmail

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Territory and Named account contacts

Files are broken in two types:

  • Customers
  • Partners

Structure

Structure types are:

  • name - customers first and last name
  • email
  • company - customers company name
  • title - persons title
  • data1 - open entry point
  • data2 - open entry point
  • phone
  • category - customer or partner
  • type - T is for Territory; N is for Named
[
{
  "name": "John Doe",
  "email": "jdoe@mail.com",
  "company": "Acme",
  "title": "Manager",
  "data1": "",
  "data2": "",
  "phone": "111-222-1234",
  "category": "customer",
  "type": "T"
},
{
  "name": "Joe Public",
  "email": "jpublic@mail.com",
  "company": "WWT",
  "title": "Solutions Architect",
  "data1": "",
  "data2": "",
  "phone": "111-222-1234",
  "category": "partner",
  "type": ""
}
]

USAGE

First Time

Use git clone git@github.com:cwise24/contactAndmail this will create a local folder with all the files needed

Start with git pull ALWAYS This will update your local files with any changes that may have been made.

Python

From your terminal, cd contactAndmail/Py_Scripts so you are in the directory, from here it's a normal Python script
./locate.py

Example:

cwise@FLD-ML-00021617 ~/Projects/contactAndmail
 % ./locate.py 
Enter location to search by: 
         1 => LV 
         2 => AZ 
         3 => NM 
1
Enter company name you want to search by: companyA
First Last email@boyd.com  702-123-1234

Py Program functions

  • help.py - search for contact by first 3 letters of name
  • locate.py - search for contact by territory and company name
  • make_csv.py - makes a csv file for mail merge; all account types and categories
  • nam_mk_csv.py - makes a csv for mail merge; Named accounts only no partners
  • ter_mk_csv.py - makes a csv for mail merge; Territory accounts only no partners
  • part_mk_csv.py - makes a csv for mail merge; Entire territory only partners
  • ter_part_mk_csv.py - makes a csv for mail merge; Entire territory with partners
  • nam_part_mk_csv.py - makes a csv for mail merge; Entire Named with partners

For any account use the locate.py script to search contacts by company name.
If you are unsure of company or location use the help.py and enter at least the first 3 letters of the name.
There is also partner.py to locate all the partners for all locations.

Lastly, the make_csv.py will create a csv file from all 3 lists to be used by mail merge.

.gitignore

Created by Gitignore.io

Mail Merge

Based on Mac
From a Mac I still had to enable Apple Mail and set my mail reader preference to Outlook
Generate a new csv file using the Python Scripts. You'll need to open it and Save As .xslx

Open a new word doc and Click on Mailings, from drop down on Start Mail Merge and I select Letters

Now Select Recipients and choose Use an Existing List.. select recipients

Add file and select entire workbook
workbook

Now you can begin typeing your message, to add an individuals names from the Insert Merge Field section and chosing the header filed name insert_recipients select recipients

Using the MailMerge.scpt, steps to use

  • Move Outlook to OFFLINE
  • Finish & Merge => Merge to Email
  • Open Apple Script with editor

AppleScript

  • Edit highlighted line for your file to attach; full path
  • Click play button (this will take time to finish)
  • Once complete, uncheck Outlook Offine

Mac use of Starup File (this did NOT work for me)

To setup the drop in file for Word I had to perform these steps

Navigate Word and Preferences: Preferences

Now select File Locations File Location

Highlight Startup and click Modify, here you can select or create a new folder to house your startup files Startup

Now close Word; Once you open it again you will now see the Merge Tools

youtube

About


Languages

Language:Python 100.0%