Sub xiugaimobsan()
Dim myrange As Range
Dim MyDialog As FileDialog, vrtSelectedItem As Variant, doc As Document
Set MyDialog = Application.FileDialog(msoFileDialogFilePicker)
If MyDialog.Show = -1 Then
Application.ScreenUpdating = False
For Each vrtSelectedItem In MyDialog.SelectedItems
Set doc = Documents.Open(FileName:=vrtSelectedItem, Visible:=True)
With doc
With selection.Find
.ClearFormatting
.Text = "Conflicts of Interest"
.Font.Bold = True
.Execute
If .Found Then
selection.MoveDown unit:=wdParagraph
selection.MoveLeft unit:=wdCharacter, count:=1
selection.TypeText Text:="" & Chr(13) & Chr(10) & "Preprints: We offer you the option to make your (not yet peer-reviewed) manuscript available online immediately in preprint format on platform Preprints. For more information, please refer to the instructions at: https://www.preprints.org/instructions_for_authors. Papers undergo a short screening process and are put online in open access format within 24 hours."
selection.Paragraphs(1).Range.Style = ActiveDocument.Styles("MDPI_6.2_Acknowledgments")
selection.Paragraphs(1).Range.Font.Size = 9
selection.Paragraphs(1).Range.Select
Set myrange = selection.Paragraphs(1).Range
myrange.Select
myrange.SetRange Start:=selection.Range.Start, End:=selection.Range.Start + 10
myrange.Font.Bold = -1
End If
End With
.Close True
End With
Next
Application.ScreenUpdating = True
End If
MsgBox "格式化文档操作设置完毕!", vbInformation
End Sub