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
המאקרואים הוקלט במיוחד, שיעבוד גם על מילים בתוך פסקה, וגם על פסקה שלימה.
לא מסתבר שאצלי עובד ואצלכם לא. משהו אתם עושים באופן שונה.
אני יגדיר עוד פעם הכללים:
כדי להוסיף גרש\גרשיים למלה אחת, לא בוחרים המלה, אלא עומדים לפני המלה ומפעילים המאקרו המיועד למלה אחת.
כדי להוסיף גרש\גרשיים ליותר ממלה אחת, בוחרים המילים\הפיסקה הרצויים, ומפעילים המאקרו המיועד ליותר ממלה אחת.
פשוט מאד
אפשר להבין הדו"ד ביניכם? מה פשוט, ועל מה התודה?תודה.
למה זה לא עובד לי?בחפש את:
" (*) "
שים לב שיש רווח ליפני ואחרי כל אחד מהגרשיים
בהחלף ב:
"\1"
שים לב שיש רווח לפני הגרשיים הראשון ואחרי הגרשיים האחרון
בצורה כזו כל פעם וורד ימצא את הגרשיים שניים שניים כלומר את הגרשיים שלפני ושאחרי הציטוט.
החיפוש עם תוים כלליים כמובן.
למה זה לא עובד לי?בחפש את:
" (*) "
שים לב שיש רווח ליפני ואחרי כל אחד מהגרשיים
בהחלף ב:
"\1"
שים לב שיש רווח לפני הגרשיים הראשון ואחרי הגרשיים האחרון
בצורה כזו כל פעם וורד ימצא את הגרשיים שניים שניים כלומר את הגרשיים שלפני ושאחרי הציטוט.
החיפוש עם תוים כלליים כמובן.
rhon.co.il
מעכשיו, תהיו הראשונים לקבל את כל העדכונים, החדשות, ההפתעות בלעדיות, והתכנים הכי חמים שלנו בפרוג!
חלה שגיאה בשליחה. נסו שוב!
לוח לימודים
מסלולי לימוד שאפשר להצטרף
אליהם ממש עכשיו:
תהילים פרק כה
אלְדָוִד אֵלֶיךָ יי נַפְשִׁי אֶשָּׂא:באֱלֹהַי בְּךָ בָטַחְתִּי אַל אֵבוֹשָׁה אַל יַעַלְצוּ אֹיְבַי לִי:גגַּם כָּל קוֶֹיךָ לֹא יֵבֹשׁוּ יֵבֹשׁוּ הַבּוֹגְדִים רֵיקָם:דדְּרָכֶיךָ יי הוֹדִיעֵנִי אֹרְחוֹתֶיךָ לַמְּדֵנִי:ההַדְרִיכֵנִי בַאֲמִתֶּךָ וְלַמְּדֵנִי כִּי אַתָּה אֱלֹהֵי יִשְׁעִי אוֹתְךָ קִוִּיתִי כָּל הַיּוֹם:וזְכֹר רַחֲמֶיךָ יי וַחֲסָדֶיךָ כִּי מֵעוֹלָם הֵמָּה:זחַטֹּאות נְעוּרַי וּפְשָׁעַי אַל תִּזְכֹּר כְּחַסְדְּךָ זְכָר לִי אַתָּה לְמַעַן טוּבְךָ יי:חטוֹב וְיָשָׁר יי עַל כֵּן יוֹרֶה חַטָּאִים בַּדָּרֶךְ:טיַדְרֵךְ עֲנָוִים בַּמִּשְׁפָּט וִילַמֵּד עֲנָוִים דַּרְכּוֹ:יכָּל אָרְחוֹת יי חֶסֶד וֶאֱמֶת לְנֹצְרֵי בְרִיתוֹ וְעֵדֹתָיו:יאלְמַעַן שִׁמְךָ יי וְסָלַחְתָּ לַעֲוֹנִי כִּי רַב הוּא:יבמִי זֶה הָאִישׁ יְרֵא יי יוֹרֶנּוּ בְּדֶרֶךְ יִבְחָר:יגנַפְשׁוֹ בְּטוֹב תָּלִין וְזַרְעוֹ יִירַשׁ אָרֶץ:ידסוֹד יי לִירֵאָיו וּבְרִיתוֹ לְהוֹדִיעָם:טועֵינַי תָּמִיד אֶל יי כִּי הוּא יוֹצִיא מֵרֶשֶׁת רַגְלָי:טזפְּנֵה אֵלַי וְחָנֵּנִי כִּי יָחִיד וְעָנִי אָנִי:יזצָרוֹת לְבָבִי הִרְחִיבוּ מִמְּצוּקוֹתַי הוֹצִיאֵנִי:יחרְאֵה עָנְיִי וַעֲמָלִי וְשָׂא לְכָל חַטֹּאותָי:יטרְאֵה אוֹיְבַי כִּי רָבּוּ וְשִׂנְאַת חָמָס שְׂנֵאוּנִי:כשָׁמְרָה נַפְשִׁי וְהַצִּילֵנִי אַל אֵבוֹשׁ כִּי חָסִיתִי בָךְ:כאתֹּם וָיֹשֶׁר יִצְּרוּנִי כִּי קִוִּיתִיךָ:כבפְּדֵה אֱלֹהִים אֶת יִשְׂרָאֵל מִכֹּל צָרוֹתָיו:
הנושאים החמים