⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 花名册(全部).txt

📁 有关学生档案
💻 TXT
字号:
Use "D:\测试\数据2002-1-31\学生管理!学生档案"
oWord = CREATEOBJECT("Word.Application")
oWord.visible=.t.
oWord.documents.add
oWord.ActiveWindow.View.Type=3

With oWord.ActiveDocument.PageSetup
	.LineNumbering.Active = .F.
	.TopMargin = 72
	.BottomMargin = 72
	.LeftMargin = 90
	.RightMargin = 90
	.Gutter = 0
	.HeaderDistance = 42.55
	.FooterDistance = 49.6
	.PageWidth = 595.35
	.PageHeight = 841.95
	.OddAndEvenPagesHeaderFooter = .F.
	.DifferentFirstPageHeaderFooter = .F.
	.SuppressEndnotes = .F.
	.MirrorMargins = .F.
	.TwoPagesOnOne = .F.
Endwith

oWord.Selection.TypeParagraph
oWord.Selection.font.bold=.T.
oWord.Selection.font.name='仿宋'
oWord.Selection.font.size=23
oWord.Selection.typetext("                花 名 册")
oWord.Selection.TypeParagraph
oWord.Selection.font.name='宋体'
oWord.Selection.font.size=10.5
oWord.Selection.font.bold=.F.
oWord.Selection.TypeParagraph

oWord.ActiveDocument.Tables.Add(oWord.Selection.Range,reccount()+1,3)
oWord.ActiveDocument.Tables(1).Cell(1,1).Range.InsertAfter("学号")
oWord.ActiveDocument.Tables(1).Cell(1,1).Select
oWord.Selection.Cells.VerticalAlignment = 1
oWord.Selection.ParagraphFormat.Alignment = 1
oWord.ActiveDocument.Tables(1).Cell(1,2).Range.InsertAfter("姓名")
oWord.ActiveDocument.Tables(1).Cell(1,2).Select
oWord.Selection.Cells.VerticalAlignment = 1
oWord.Selection.ParagraphFormat.Alignment = 1
oWord.ActiveDocument.Tables(1).Cell(1,3).Range.InsertAfter("班级")
oWord.ActiveDocument.Tables(1).Cell(1,3).Select
oWord.Selection.Cells.VerticalAlignment = 1
oWord.Selection.ParagraphFormat.Alignment = 1
For i=1 to reccount()
    Go i
    oWord.ActiveDocument.Tables(1).Cell(i+1,1).Range.InsertAfter(学号)
    oWord.ActiveDocument.Tables(1).Cell(i+1,1).Select
    oWord.Selection.Cells.VerticalAlignment = 1
    oWord.Selection.ParagraphFormat.Alignment = 1
    oWord.ActiveDocument.Tables(1).Cell(i+1,2).Range.InsertAfter(姓名)
    oWord.ActiveDocument.Tables(1).Cell(i+1,2).Select
    oWord.Selection.Cells.VerticalAlignment = 1
    oWord.Selection.ParagraphFormat.Alignment = 1
    oWord.ActiveDocument.Tables(1).Cell(i+1,3).Range.InsertAfter(专业、班级)
    oWord.ActiveDocument.Tables(1).Cell(i+1,3).Select
    oWord.Selection.Cells.VerticalAlignment = 1
    oWord.Selection.ParagraphFormat.Alignment = 1
Endfor
oWord.Selection.movedown(7,1)

mypagenum=oWord.Selection.Sections(1).Headers(1).PageNumbers
mypagenum.NumberStyle=0
mypagenum.HeadingLevelForChapter=0
mypagenum.IncludeChapterNumber=.f.
mypagenum.ChapterPageSeparator=0
mypagenum.RestartNumberingAtSection=.f.
mypagenum.StartingNumber=0
oWord.Selection.Sections(1).Footers(1).PageNumbers.Add (1,.t.)

Use in 学生档案

oWord.quit














⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -