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 разобраться в макросепоясните каждое действиезаранее огромное !

torivova2004 torivova2004    2   29.04.2019 11:44    0

Другие вопросы по теме Алгебра