|
第 2 道小题代码:
- Sub a1复制经纬度()
- Dim a$
- Documents("船东午报").Activate
- ActiveDocument.Paragraphs(8).Range.ListFormat.ConvertNumbersToText
- a = ActiveDocument.Paragraphs(8).Range.Text
- Documents("管理公司午报").Activate
- ActiveDocument.Paragraphs(8).Range.Text = a
- ActiveDocument.Paragraphs(8).Range.Characters(3).Text = "PSN Lat:"
-
- If ActiveDocument.Paragraphs(8).Range.Characters(InStr(ActiveDocument.Paragraphs(8).Range, "/") + 1) = " " Then
- ActiveDocument.Paragraphs(8).Range.Characters(InStr(ActiveDocument.Paragraphs(8).Range, "/") + 1).InsertAfter Text:="Long:"
-
- Else
- ActiveDocument.Paragraphs(8).Range.Characters(InStr(ActiveDocument.Paragraphs(8).Range, "/")).InsertAfter Text:="Long:"
- End If
- If ActiveDocument.Paragraphs(8).Range.Characters(InStr(ActiveDocument.Paragraphs(8).Range, "/") + 1) = " " Then ActiveDocument.Paragraphs(8).Range.Characters(InStr(ActiveDocument.Paragraphs(8).Range, "/") + 1).Delete
- If ActiveDocument.Paragraphs(8).Range.Characters(InStr(ActiveDocument.Paragraphs(8).Range, "/") - 1) = " " Then ActiveDocument.Paragraphs(8).Range.Characters(InStr(ActiveDocument.Paragraphs(8).Range, "/") - 1).Delete
- ActiveDocument.Paragraphs(8).Range.Font.Color = wdColorRed '红色
- End Sub
复制代码 |
|