forked from qqqstuv/Cover-Letter-Generator
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmake_doc.py
More file actions
41 lines (25 loc) · 737 Bytes
/
make_doc.py
File metadata and controls
41 lines (25 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from docx import Document
from docx.shared import Inches
# from docx.enum.text import WD_ALIGN_PARAGRAPH
name = "Duc Nguyen"
address = "Victoria BC"
phone = "250-884-6325"
mail = "dukeng@uvic.ca"
def format_size_and_font(paraObj):
paraObj.font.size =
document = Document()
document.add_heading(name, 2)
contact_info = document.add_paragraph("ERWERWERWERWERWER")
# contact_info.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
# set first table of contact info
# contact_info.add_run(address)
# contact_info.add_run(phone)
# contact_info.add_run(mail)
paras = document.paragraphs
idx = 0
for para in paras:
print("________", idx, "____________")
idx += 1
print(para.text)
para.clear()
document.save("news.docx")