![]() |
|
|
|
#1
|
||||
|
||||
|
Hi - it is me here again to bother you. Hope you are not getting sick of me...
The document I am doing my scholarly work on is in Hebrew. In Hebrew we use many acronyms that are designated as such with double quotes in them. So 'Washington District of Columbia' would equal out to 'Washington D"C' Now these quotes are going to disqualify the whole TC field and it will not be picked up in the TOC field. So we have to replace it like this: Washington D/"C And then it works. So I need to scan the selected text before it is inserted by the above macro that I wrote and see if there are quotes in the middle of a word they should be replaced with ' /" ' and only then inserted into the TC field. This is over my small programming head. Could you help me? Thanks again Susan |
|
#2
|
|||
|
|||
|
Hi, RRB! The following will do the job:
Code:
Sub Replace_Double_Quotes()
With selection.range.Find
.text = "([A-z])" & Chr(34) & "([A-z])"
.Replacement.text = "\1/" & Chr(34) & "\2"
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
End With
End Sub
|
|
#3
|
||||
|
||||
|
I am at lack of the correct words to express my gratitude.
Maybe you know about this: The TOC field as a switch to look within a certain bookmark i.e '\B "BookMarkName". now the rea that I have bookmarked has Footnotes, But I see all the TC fields that are in the FN are not being picked up by the TOC field. When I select the text to apply the BM it doesn't allow me to select ALSO the FN area. So how can INclude the FN area within the giving BM? Thanks a million!! Susan |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Perfect macro not working when its code is inserted in larger macro | RobiNew | Word VBA | 3 | 10-18-2023 03:19 AM |
| Macro to Remove Paras with Line Spac 6; Macro to Convert Paragraphs to Outline Numbered | venganewt | Word VBA | 0 | 01-25-2022 06:28 PM |
Footnote extraction macro [Why is this macro so slow? / anyway to make it faster?]
|
Le_Blanc | Word VBA | 10 | 03-22-2021 11:38 AM |
| Spell check macro within macro button field doesn't work in one document | samuelle | Word VBA | 0 | 07-20-2016 02:27 AM |
Macro Question: Need help making a macro to highlight the first word in every sentence
|
LadyAna | Word | 1 | 12-06-2014 10:39 PM |