🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19493

Re: Replace quoted text to italic without quotation marks

#19493
From: Robert Ole�
Date: Wed, 11 Dec 2002 01:14
63 lines
2557 bytes
I have got the MS Word Macro quite enough for me. Can someone help me and rewrite me this script to VB/ID Script. It works with Polish quotation marks.

Sub ReplacePol()
    Selection.GoTo What:=wdGoToPage, Which:=wdGoToFirst

Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting

With Selection.Find
        .Text = ChrW(8222) & "*" & ChrW(8221)
        .Forward = True
        .Wrap = wdFindContinue
        .Format = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True

With .Replacement
          .Font.Italic = True
          .Text = ""
        End With
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = ChrW(8222)
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindAsk
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = ChrW(8221)
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindAsk
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll



End Sub

Thanks In Advice, Robert
Technical Details
Message-ID: <1de6f307.4@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newspump.sol.net!news-out.cwix.com!newsfeed.cwix.com!news-hub.siol.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de6f307.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,8d45903beb021fdc
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-12-10 17:38:10 PST
From: "Robert Ole�" <ro@d2d.pl>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newspump.sol.net!news-out.cwix.com!newsfeed.cwix.com!news-hub.siol.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Replace quoted text to italic without  quotation marks
Message-ID: <1de6f307.4@WebX.la2eafNXanI>
Date: Tue, 10 Dec 2002 17:14:12 -0800
References: <1de6f307.-1@WebX.la2eafNXanI>
Lines: 64
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit