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

📄 课程设置.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.italic=.t.
oWord.Selection.font.name='仿宋'
oWord.Selection.font.size=23
oWord.Selection.typetext("               课程设置")
oWord.Selection.font.size=12
oWord.Selection.TypeParagraph
oWord.Selection.TypeParagraph

oWord.Selection.font.bold=.f.
oWord.Selection.font.italic=.f.
oWord.Selection.font.name='宋体'
oWord.Selection.font.size=10.5
oWord.ActiveDocument.Tables.Add(oWord.Selection.Range,reccount()+1,4)
oWord.selection.movedown(4,28)
oWord.ActiveDocument.tables(1).select
oWord.selection.Borders.OutsideLineWidth=18

oWord.ActiveDocument.Tables(1).Cell(1,1).Range.InsertAfter('课程名称')
oWord.ActiveDocument.Tables(1).Cell(1,2).Range.InsertAfter('学时')
oWord.ActiveDocument.Tables(1).Cell(1,3).Range.InsertAfter('学分')
oWord.ActiveDocument.Tables(1).Cell(1,4).Range.InsertAfter('备注')

For IncludeChapterNumber=1 to reccount()
	Go IncludeChapterNumber
	oWord.ActiveDocument.Tables(1).Cell(IncludeChapterNumber+1,1).Range.InsertAfter(课程名称)
	oWord.ActiveDocument.Tables(1).Cell(IncludeChapterNumber+1,2).Range.InsertAfter(学时)
	oWord.ActiveDocument.Tables(1).Cell(IncludeChapterNumber+1,3).Range.InsertAfter(学分)
	oWord.ActiveDocument.Tables(1).Cell(IncludeChapterNumber+1,4).Range.InsertAfter(备注)
Endfor

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.ActiveDocument.Tables(1).Columns(1).Select
oWord.Selection.Columns.PreferredWidth = 115
oWord.ActiveDocument.Tables(1).Columns(2).Select
oWord.Selection.Columns.PreferredWidth = 60
oWord.ActiveDocument.Tables(1).Columns(3).Select
oWord.Selection.Columns.PreferredWidth = 60
oWord.ActiveDocument.Tables(1).Columns(4).Select
oWord.Selection.Columns.PreferredWidth = 170
oWord.Selection.MoveLeft
oWord.Selection.Tables(1).Rows.Alignment = 1

oWord.quit

⌨️ 快捷键说明

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