发布网友
共2个回答
热心网友
本示例在活动文档中的所有居中段落底部应用下边框。
For Each para In ActiveDocument.Paragraphs
If para.Alignment = wdAlignParagraphCenter Then
para.Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
para.Borders(wdBorderBottom).LineWidth = wdLineWidth300pt
End If
Next para
下列示例将活动首段的格式设置为 24 磅、Arial 和倾斜。
Set myRange = ActiveDocument.Paragraphs(1).Range
With myRange.Font
.Bold = True
.Name = "Arial"
.Size = 24
End With
本示例在活动文档各段的 2 英寸处添加居中的制表位。InchesToPoints 方法用来将英寸转化为磅值。
With ActiveDocument.Paragraphs.TabStops
.Add Position:= InchesToPoints(2), Alignment:= wdAlignTabCenter
End With
本示例检查活动文档,以确定其所用的语言类型并显示检查结果。
With ActiveDocument
If .LanguageDetected = True Then
x = MsgBox("This document has already " _
& "been checked. Do you want to check " _
& "it again?", vbYesNo)
If x = vbYes Then
.LanguageDetected = False
.DetectLanguage
End If
Else
.DetectLanguage
End If
If .Range.LanguageID = wdEnglishUS Then
MsgBox "This is a U.S. English document."
Else
MsgBox "This is not a U.S. English document."
End If
End With
热心网友
文档中的所有居中段落底部应用下边框。
For Each para In ActiveDocument.Paragraphs
If para.Alignment = wdAlignParagraphCenter Then
para.Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
para.Borders(wdBorderBottom).LineWidth = wdLineWidth300pt
End If
Next para
下列示例将活动首段的格式设置为 24 磅、Arial 和倾斜。
Set myRange = ActiveDocument.Paragraphs(1).Range
With myRange.Font
.Bold = True
.Name = "Arial"
.Size = 24
End With
本示例在活动文档各段的 2 英寸处添加居中的制表位。InchesToPoints 方法用来将英寸转化为磅值。
With ActiveDocument.Paragraphs.TabStops
.Add Position:= InchesToPoints(2), Alignment:= wdAlignTabCenter
End With
本示例检查活动文档,以确定其所用的语言类型并显示检查结果。
With ActiveDocument
If .LanguageDetected = True Then
x = MsgBox("This document has already " _
& "been checked. Do you want to check " _
& "it again?", vbYesNo)
If x = vbYes Then
.LanguageDetected = False
.DetectLanguage
End If
Else
.DetectLanguage
End If
If .Range.LanguageID = wdEnglishUS Then
MsgBox "This is a U.S. English document."
Else
MsgBox "This is not a U.S. English document."
End If
End With
热心网友
本示例在活动文档中的所有居中段落底部应用下边框。
For Each para In ActiveDocument.Paragraphs
If para.Alignment = wdAlignParagraphCenter Then
para.Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
para.Borders(wdBorderBottom).LineWidth = wdLineWidth300pt
End If
Next para
下列示例将活动首段的格式设置为 24 磅、Arial 和倾斜。
Set myRange = ActiveDocument.Paragraphs(1).Range
With myRange.Font
.Bold = True
.Name = "Arial"
.Size = 24
End With
本示例在活动文档各段的 2 英寸处添加居中的制表位。InchesToPoints 方法用来将英寸转化为磅值。
With ActiveDocument.Paragraphs.TabStops
.Add Position:= InchesToPoints(2), Alignment:= wdAlignTabCenter
End With
本示例检查活动文档,以确定其所用的语言类型并显示检查结果。
With ActiveDocument
If .LanguageDetected = True Then
x = MsgBox("This document has already " _
& "been checked. Do you want to check " _
& "it again?", vbYesNo)
If x = vbYes Then
.LanguageDetected = False
.DetectLanguage
End If
Else
.DetectLanguage
End If
If .Range.LanguageID = wdEnglishUS Then
MsgBox "This is a U.S. English document."
Else
MsgBox "This is not a U.S. English document."
End If
End With
热心网友
本示例在活动文档中的所有居中段落底部应用下边框。
For Each para In ActiveDocument.Paragraphs
If para.Alignment = wdAlignParagraphCenter Then
para.Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
para.Borders(wdBorderBottom).LineWidth = wdLineWidth300pt
End If
Next para
下列示例将活动首段的格式设置为 24 磅、Arial 和倾斜。
Set myRange = ActiveDocument.Paragraphs(1).Range
With myRange.Font
.Bold = True
.Name = "Arial"
.Size = 24
End With
本示例在活动文档各段的 2 英寸处添加居中的制表位。InchesToPoints 方法用来将英寸转化为磅值。
With ActiveDocument.Paragraphs.TabStops
.Add Position:= InchesToPoints(2), Alignment:= wdAlignTabCenter
End With
本示例检查活动文档,以确定其所用的语言类型并显示检查结果。
With ActiveDocument
If .LanguageDetected = True Then
x = MsgBox("This document has already " _
& "been checked. Do you want to check " _
& "it again?", vbYesNo)
If x = vbYes Then
.LanguageDetected = False
.DetectLanguage
End If
Else
.DetectLanguage
End If
If .Range.LanguageID = wdEnglishUS Then
MsgBox "This is a U.S. English document."
Else
MsgBox "This is not a U.S. English document."
End If
End With
热心网友
文档中的所有居中段落底部应用下边框。
For Each para In ActiveDocument.Paragraphs
If para.Alignment = wdAlignParagraphCenter Then
para.Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
para.Borders(wdBorderBottom).LineWidth = wdLineWidth300pt
End If
Next para
下列示例将活动首段的格式设置为 24 磅、Arial 和倾斜。
Set myRange = ActiveDocument.Paragraphs(1).Range
With myRange.Font
.Bold = True
.Name = "Arial"
.Size = 24
End With
本示例在活动文档各段的 2 英寸处添加居中的制表位。InchesToPoints 方法用来将英寸转化为磅值。
With ActiveDocument.Paragraphs.TabStops
.Add Position:= InchesToPoints(2), Alignment:= wdAlignTabCenter
End With
本示例检查活动文档,以确定其所用的语言类型并显示检查结果。
With ActiveDocument
If .LanguageDetected = True Then
x = MsgBox("This document has already " _
& "been checked. Do you want to check " _
& "it again?", vbYesNo)
If x = vbYes Then
.LanguageDetected = False
.DetectLanguage
End If
Else
.DetectLanguage
End If
If .Range.LanguageID = wdEnglishUS Then
MsgBox "This is a U.S. English document."
Else
MsgBox "This is not a U.S. English document."
End If
End With
热心网友
文档中的所有居中段落底部应用下边框。
For Each para In ActiveDocument.Paragraphs
If para.Alignment = wdAlignParagraphCenter Then
para.Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
para.Borders(wdBorderBottom).LineWidth = wdLineWidth300pt
End If
Next para
下列示例将活动首段的格式设置为 24 磅、Arial 和倾斜。
Set myRange = ActiveDocument.Paragraphs(1).Range
With myRange.Font
.Bold = True
.Name = "Arial"
.Size = 24
End With
本示例在活动文档各段的 2 英寸处添加居中的制表位。InchesToPoints 方法用来将英寸转化为磅值。
With ActiveDocument.Paragraphs.TabStops
.Add Position:= InchesToPoints(2), Alignment:= wdAlignTabCenter
End With
本示例检查活动文档,以确定其所用的语言类型并显示检查结果。
With ActiveDocument
If .LanguageDetected = True Then
x = MsgBox("This document has already " _
& "been checked. Do you want to check " _
& "it again?", vbYesNo)
If x = vbYes Then
.LanguageDetected = False
.DetectLanguage
End If
Else
.DetectLanguage
End If
If .Range.LanguageID = wdEnglishUS Then
MsgBox "This is a U.S. English document."
Else
MsgBox "This is not a U.S. English document."
End If
End With
热心网友
本示例在活动文档中的所有居中段落底部应用下边框。
For Each para In ActiveDocument.Paragraphs
If para.Alignment = wdAlignParagraphCenter Then
para.Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
para.Borders(wdBorderBottom).LineWidth = wdLineWidth300pt
End If
Next para
下列示例将活动首段的格式设置为 24 磅、Arial 和倾斜。
Set myRange = ActiveDocument.Paragraphs(1).Range
With myRange.Font
.Bold = True
.Name = "Arial"
.Size = 24
End With
本示例在活动文档各段的 2 英寸处添加居中的制表位。InchesToPoints 方法用来将英寸转化为磅值。
With ActiveDocument.Paragraphs.TabStops
.Add Position:= InchesToPoints(2), Alignment:= wdAlignTabCenter
End With
本示例检查活动文档,以确定其所用的语言类型并显示检查结果。
With ActiveDocument
If .LanguageDetected = True Then
x = MsgBox("This document has already " _
& "been checked. Do you want to check " _
& "it again?", vbYesNo)
If x = vbYes Then
.LanguageDetected = False
.DetectLanguage
End If
Else
.DetectLanguage
End If
If .Range.LanguageID = wdEnglishUS Then
MsgBox "This is a U.S. English document."
Else
MsgBox "This is not a U.S. English document."
End If
End With
热心网友
文档中的所有居中段落底部应用下边框。
For Each para In ActiveDocument.Paragraphs
If para.Alignment = wdAlignParagraphCenter Then
para.Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
para.Borders(wdBorderBottom).LineWidth = wdLineWidth300pt
End If
Next para
下列示例将活动首段的格式设置为 24 磅、Arial 和倾斜。
Set myRange = ActiveDocument.Paragraphs(1).Range
With myRange.Font
.Bold = True
.Name = "Arial"
.Size = 24
End With
本示例在活动文档各段的 2 英寸处添加居中的制表位。InchesToPoints 方法用来将英寸转化为磅值。
With ActiveDocument.Paragraphs.TabStops
.Add Position:= InchesToPoints(2), Alignment:= wdAlignTabCenter
End With
本示例检查活动文档,以确定其所用的语言类型并显示检查结果。
With ActiveDocument
If .LanguageDetected = True Then
x = MsgBox("This document has already " _
& "been checked. Do you want to check " _
& "it again?", vbYesNo)
If x = vbYes Then
.LanguageDetected = False
.DetectLanguage
End If
Else
.DetectLanguage
End If
If .Range.LanguageID = wdEnglishUS Then
MsgBox "This is a U.S. English document."
Else
MsgBox "This is not a U.S. English document."
End If
End With
热心网友
本示例在活动文档中的所有居中段落底部应用下边框。
For Each para In ActiveDocument.Paragraphs
If para.Alignment = wdAlignParagraphCenter Then
para.Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
para.Borders(wdBorderBottom).LineWidth = wdLineWidth300pt
End If
Next para
下列示例将活动首段的格式设置为 24 磅、Arial 和倾斜。
Set myRange = ActiveDocument.Paragraphs(1).Range
With myRange.Font
.Bold = True
.Name = "Arial"
.Size = 24
End With
本示例在活动文档各段的 2 英寸处添加居中的制表位。InchesToPoints 方法用来将英寸转化为磅值。
With ActiveDocument.Paragraphs.TabStops
.Add Position:= InchesToPoints(2), Alignment:= wdAlignTabCenter
End With
本示例检查活动文档,以确定其所用的语言类型并显示检查结果。
With ActiveDocument
If .LanguageDetected = True Then
x = MsgBox("This document has already " _
& "been checked. Do you want to check " _
& "it again?", vbYesNo)
If x = vbYes Then
.LanguageDetected = False
.DetectLanguage
End If
Else
.DetectLanguage
End If
If .Range.LanguageID = wdEnglishUS Then
MsgBox "This is a U.S. English document."
Else
MsgBox "This is not a U.S. English document."
End If
End With
热心网友
文档中的所有居中段落底部应用下边框。
For Each para In ActiveDocument.Paragraphs
If para.Alignment = wdAlignParagraphCenter Then
para.Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
para.Borders(wdBorderBottom).LineWidth = wdLineWidth300pt
End If
Next para
下列示例将活动首段的格式设置为 24 磅、Arial 和倾斜。
Set myRange = ActiveDocument.Paragraphs(1).Range
With myRange.Font
.Bold = True
.Name = "Arial"
.Size = 24
End With
本示例在活动文档各段的 2 英寸处添加居中的制表位。InchesToPoints 方法用来将英寸转化为磅值。
With ActiveDocument.Paragraphs.TabStops
.Add Position:= InchesToPoints(2), Alignment:= wdAlignTabCenter
End With
本示例检查活动文档,以确定其所用的语言类型并显示检查结果。
With ActiveDocument
If .LanguageDetected = True Then
x = MsgBox("This document has already " _
& "been checked. Do you want to check " _
& "it again?", vbYesNo)
If x = vbYes Then
.LanguageDetected = False
.DetectLanguage
End If
Else
.DetectLanguage
End If
If .Range.LanguageID = wdEnglishUS Then
MsgBox "This is a U.S. English document."
Else
MsgBox "This is not a U.S. English document."
End If
End With