Sub макрос5() ' ' макрос5 макрос ' ' dim number as long dim names as string number = inputbox("введите номер курсанского") names = inputbox("введите фамилию имя отчество") dim sa as double dim step as long dim min_num as integer sa = number mod 10 step = 10 do dim this_num as integer this_num = ((number - number mod step) mod (step * 10)) / step sa = (sa + this_num) / 2 step = step * 10 loop while step < number first_space_index = instr(1, names, " ") last_space_index = instrrev(names, " ", len(names)) len_first_word = len(left(names, first_space_index - 1)) len_second_word = last_space_index - 1 - first_space_index len_third_word = len(names) - last_space_index if len_first_word < = len_second_word then if len_frist_word < = len_third_word then min_num = len_first_word else min_num = len_third_word end if elseif len_second_word < = len_third_word then min_num = len_second_word else min_num = len_third_word end if selection.wholestory dim words_count as integer words_count = selection.words.count selection.homekey unit: =wdstory for i = 1 to words_count selection.moveright unit: =wdword, count: =1, extend: =wdextend if len(selection.text) < = sa then selection.font.size = 18 selection.font.colorindex = wdred selection.font.spacing = 3 selection.font.bold = true end if if len(selection.text) > = min_num then selection.text = " okay " end if selection.moveright unit: =wdcharacter, count: =1 next i end sub разобраться в макросепоясните каждое действиезаранее огромное !
139
411
Ответы на вопрос:
Популярно: Алгебра
-
Котя53409.09.2021 09:59
-
ketti20414.03.2023 23:12
-
Khan1111114.11.2021 07:26
-
7LittleKitten702.03.2022 01:12
-
МарияЛобачева04.02.2021 17:57
-
atas203.04.2021 17:22
-
NAPAS22803.12.2022 15:05
-
аминат4101.05.2021 22:21
-
nvanislavskaya02.03.2021 12:10
-
LONNI3426.06.2020 18:52