![]() |
Documents("MyDoc.doc").TrackRevisions = True |
ActiveDocument.PrintOut From:=1, To:=3 |
![]() |
Set newDoc = Documents.Add With newDoc .Content.Font.Name = "Arial" .SaveAs FileName:="Sample.doc" End With |
Documents.Open FileName:="C:\MyFolder\MyDocument.doc" |
Documents("Sales.doc").Save |
Documents.Save |
ActiveDocument.SaveAs FileName:="Temp.doc" |
Documents("Sales.doc").Close SaveChanges:=wdSaveChanges |
Documents.Close SaveChanges:=wdDoNotSaveChanges |
Dim newDoc As Word.Document Set newDoc = new Word.Document |
With newDoc .Content.Font.Name = "宋体" .Content.Font.Size = 12 .Content.Paragraphs.LineSpacing = 15.5 End With |
With newDoc .Content.InsertAfter "示例段落…" .Paragraphs(NewDoc.Paragraphs.count).Alignment = wdAlignParagraphCenter .Paragraphs(NewDoc.Paragraphs.count).Range.Font.Bold = True .Paragraphs(NewDoc.Paragraphs.count).Range.Font.Size = 28 End With |
Set myRange = ActiveDocument.Range(Start:=0, End:=0) ActiveDocument.Tables.Add Range:=myRange, NumRows:=3, NumColumns:=4 |
NewDoc.Content.InsertAfter "得分" & vbTab & " " & vbTab & "评卷人" & vbTab & " " & vbCr |
![]() |
newDoc.PageSetup.TextColumns.SetCount NumColumns:=2 newDoc.PageSetup.TextColumns.Spacing = CentimetersToPoints(2) |
With newDoc.PageSetup .TopMargin = CentimetersToPoints(4.5) .BottomMargin = CentimetersToPoints(1.5) .LeftMargin = CentimetersToPoints(0.8) .RightMargin = CentimetersToPoints(2) End With |
With newDoc.PageSetup .PageHeight = CentimetersToPoints(28.1) .PageWidth = CentimetersToPoints(38.9) End With |
newDoc.SaveAs FileName:="Sample.doc" newDoc.PrintOut |
![]() |