Sub הוספת_גרשיים_לפני_ואחרי_מילה()
'
' הוספת_גרשיים_לפני_ואחרי_מילה Macro
'
'
Selection.TypeText Text:=""""
Selection.MoveRight Unit:=wdWord, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText Text:=""""
End Sub
הוספה ושינוי קטן.
בדרך כלל במקרה של השואל, מדובר שעוברים על המסמך באמצעת ctrl+חץ שמאלי, וכשמגיעים לאיזה מילה רוצים להוסיף גרשיים, אז יותר טוב ליצור המאקרו שיהיה נוח, כשמיד כשמגיעים למילה יוכל להפעיל המאקרו.
ועוד הוספה קטנה: ליצור קיצור במקלדת למאקרו, כך אפשר ממש בין רגע לייצר הגרשיים.
והנה הוא לפניכם:
קוד:Sub הוספת_גרשיים_לפני_ואחרי_מילה() ' ' הוספת_גרשיים_לפני_ואחרי_מילה Macro ' ' Selection.TypeText Text:="""" Selection.MoveRight Unit:=wdWord, Count:=1 Selection.MoveLeft Unit:=wdCharacter, Count:=1 Selection.TypeText Text:="""" End Sub
כמובן אפשר ליצור אותו דבר, למרכאה אחת, או כל דבר אחר.
Sub הוספת_גרש_לפני_ואחרי_מילה()
'
' הוספת_גרש_לפני_ואחרי_מילה Macro
'
'
Selection.TypeText Text:=''''
Selection.MoveRight Unit:=wdWord, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText Text:=''''
End Sub
Sub הוספת_גרש_אחד_לפני_ואחרי_מילה()
'
' הוספת_גרש_אחד_לפני_ואחרי_מילה Macro
'
'
Selection.TypeText Text:="'"
Selection.MoveRight Unit:=wdWord, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText Text:="'"
End Sub
אצלי זה עובד מצויין. אולי לא עמדתם לפני המלה. תבדקו עוד פעם. ואם עדיין לא עובד, תנסו למחוק המאקרו ולהעתיק ולהדביק עוד פעם.ניסיתי להפעיל את הקוד - והוא מוסיף את הגרש בצורה הזו - 'דוגמא ד'וגמא
ולא סוגר את המילה הראשונה.
תנסו אולי קיצור דרך אחר. גם אני יש לי 2010, ועשיתי קיצור ועובד מצוין.אגב, הקיצור דרך עבד פעם אחת, ונדם. חיפשתי ברשת ומצאתי שיש בעיה לא קלה בחלונות 10 עם קיצורי מקלדת שלא תמיד עובדים.
מישהו שמע על פתרון?
Sub הוספת_גרשיים_לפני_ואחרי_כמה_מילים_נבחרים()
'
' הוספת_גרשיים_לפני_ואחרי_כמה_מילים_נבחרים Macro
'
'
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.Cut
Selection.TypeText Text:="""<>"""
Selection.MoveLeft Unit:=wdWord, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=2
Selection.PasteAndFormat (wdFormatOriginalFormatting)
Selection.TypeText Text:=" "
Selection.MoveRight Unit:=wdWord, Count:=1
Selection.TypeText Text:=" "
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = """< "
.Replacement.Text = """"
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = " >"""
.Replacement.Text = """"
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = " >"""
.Replacement.Text = """"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = ">"""
.Replacement.Text = """"
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = """ ^p"
.Replacement.Text = """^p"
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub הוספת_גרש_אחד_לפני_ואחרי_כמה_מילים_נבחרים()
'
' הוספת_גרש_אחד_לפני_ואחרי_כמה_מילים_נבחרים Macro
'
'
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.Cut
Selection.TypeText Text:="'<>' "
Selection.MoveLeft Unit:=wdWord, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.PasteAndFormat (wdFormatOriginalFormatting)
Selection.TypeText Text:=" "
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "'< "
.Replacement.Text = "'"
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = " >'"
.Replacement.Text = "'"
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = " >'"
.Replacement.Text = "'"
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "' ^p"
.Replacement.Text = "'^p"
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
ובאם אתם רוצים לבחור כמה מילים ולהוסיף לפניהם ולאחריהם גרשיים או גרש אחד, הנה יש לכם מאקרואים אחרים:
המאקרואים הוקלט במיוחד, שיעבוד גם על מילים בתוך פסקה, וגם על פסקה שלימה.
אכן! כעת קלטתי הבעיה!ניסיתי להפעיל את הקוד - והוא מוסיף את הגרש בצורה הזו - 'דוגמא ד'וגמא
ולא סוגר את המילה הראשונה.
אכן! כעת קלטתי הבעיה!
כשרוצים להוסיף על מלה שמיד אחריו יש פסיק\נקודה\נקודתיים וכדו', אז זה משתבש.
אני עובד על פתרון. יש, אבל אני צריך את הזמן לזה. בקרוב!
ובאם אתם רוצים לבחור כמה מילים ולהוסיף לפניהם ולאחריהם גרשיים או גרש אחד, הנה יש לכם מאקרואים אחרים:
לגרשיים, תעתיקו המאקרו הזה:
קוד:Sub הוספת_גרשיים_לפני_ואחרי_כמה_מילים_נבחרים() ' ' הוספת_גרשיים_לפני_ואחרי_כמה_מילים_נבחרים Macro ' ' Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend Selection.Cut Selection.TypeText Text:="""<>""" Selection.MoveLeft Unit:=wdWord, Count:=1 Selection.MoveRight Unit:=wdCharacter, Count:=2 Selection.PasteAndFormat (wdFormatOriginalFormatting) Selection.TypeText Text:=" " Selection.MoveRight Unit:=wdWord, Count:=1 Selection.TypeText Text:=" " Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = """< " .Replacement.Text = """" .Forward = True .Wrap = wdFindContinue End With Selection.Find.Execute Replace:=wdReplaceAll With Selection.Find .Text = " >""" .Replacement.Text = """" .Forward = True .Wrap = wdFindContinue End With Selection.Find.Execute Replace:=wdReplaceAll With Selection.Find .Text = " >""" .Replacement.Text = """" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchKashida = False .MatchDiacritics = False .MatchAlefHamza = False .MatchControl = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll Selection.Find.Execute Replace:=wdReplaceAll With Selection.Find .Text = ">""" .Replacement.Text = """" .Forward = True .Wrap = wdFindContinue End With Selection.Find.Execute Replace:=wdReplaceAll Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = """ ^p" .Replacement.Text = """^p" .Forward = True .Wrap = wdFindContinue End With Selection.Find.Execute Replace:=wdReplaceAll End Sub
ובשביל גרש אחד, תעתיקו המאקרו הבא:
קוד:Sub הוספת_גרש_אחד_לפני_ואחרי_כמה_מילים_נבחרים() ' ' הוספת_גרש_אחד_לפני_ואחרי_כמה_מילים_נבחרים Macro ' ' Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend Selection.Cut Selection.TypeText Text:="'<>' " Selection.MoveLeft Unit:=wdWord, Count:=1 Selection.MoveLeft Unit:=wdCharacter, Count:=1 Selection.PasteAndFormat (wdFormatOriginalFormatting) Selection.TypeText Text:=" " Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "'< " .Replacement.Text = "'" .Forward = True .Wrap = wdFindContinue End With Selection.Find.Execute Replace:=wdReplaceAll With Selection.Find .Text = " >'" .Replacement.Text = "'" .Forward = True .Wrap = wdFindContinue End With Selection.Find.Execute Replace:=wdReplaceAll With Selection.Find .Text = " >'" .Replacement.Text = "'" .Forward = True .Wrap = wdFindContinue End With Selection.Find.Execute Replace:=wdReplaceAll Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "' ^p" .Replacement.Text = "'^p" .Forward = True .Wrap = wdFindContinue End With Selection.Find.Execute Replace:=wdReplaceAll End Sub
המאקרואים הוקלט במיוחד, שיעבוד גם על מילים בתוך פסקה, וגם על פסקה שלימה.
לוח לימודים
מסלולי לימוד שאפשר לההצטרף
אליהם ממש עכשיו:
2.04
כ"ג אדר ב'
השקה חגיגית
חדש בפרוג
קורס חדשנות AI ובינה מלאכותית
14 שיעורים מפוצצים תוכן על כלי הAI השונים ליצירת תמונות וויז'ואל, עריכת וידאו ומושן, כתיבה ורעיונות, אפיון ועיצוב אתרים ועוד המון!
ההרשמה נפתחה!
20.03
י' אדר ב'
פתיחת מסלול
עיצוב ואדריכלות פנים
מלגות גבוהות!
26.03
טז' אדר ב'
פתיחת מסלול
מאסטר בשיווק דיגיטלי
מלגות גבוהות!
8.05
ל' ניסן
פתיחת מסלול
אוטומציות עסקיות, בוטים והטמעת מערכות מידע
מלגות גבוהות!
9.05
א' אייר
ירושלמי?
יש לנו מלגה מטורפת עבורך! קורס במימון כמעט מלא!!
אוטומציות עסקיות, בוטים והטמעת מערכות מידע
ההרשמה בעיצומה
28.05
כ' אייר
פתיחת מסלול מורחב:
פיתוח ובניית אתרים
מלגות גבוהות!
תהילים פרק קכו
א שִׁיר הַמַּעֲלוֹת בְּשׁוּב יְהוָה אֶת שִׁיבַת צִיּוֹן הָיִינוּ כְּחֹלְמִים:ב אָז יִמָּלֵא שְׂחוֹק פִּינוּ וּלְשׁוֹנֵנוּ רִנָּה אָז יֹאמְרוּ בַגּוֹיִם הִגְדִּיל יְהוָה לַעֲשׂוֹת עִם אֵלֶּה:ג הִגְדִּיל יְהוָה לַעֲשׂוֹת עִמָּנוּ הָיִינוּ שְׂמֵחִים:ד שׁוּבָה יְהוָה אֶת (שבותנו) שְׁבִיתֵנוּ כַּאֲפִיקִים בַּנֶּגֶב:ה הַזֹּרְעִים בְּדִמְעָה בְּרִנָּה יִקְצֹרוּ:ו הָלוֹךְ יֵלֵךְ וּבָכֹה נֹשֵׂא מֶשֶׁךְ הַזָּרַע בֹּא יָבוֹא בְרִנָּה נֹשֵׂא אֲלֻמֹּתָיו: