Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Can someone help me create this MS Word macro?

Word macro Word Macro

  • Please log in to reply

#1
Rsquest

Rsquest

    New Member

  • Member
  • Pip
  • 2 posts

I am trying to create a macro that edits the following text:

EN Have you ever been to Florida?

FR Es-tu deja alle (allee) en Floride?

IPA [ɛ ty deʒa ale (ale) ɑ̃ floʁid ||]

EN We went there on vacation

two (2) years ago.

FR Nous sommes alles (allees) en vacances la-bas il y

a deux ans.

IPA [nu sɔm ale (ale) ɑ̃ vakɑ̃s laba z‿

i l‿i a do z‿ɑ̃ ||]

993

994

995

996

ENFR 267

EN Did you have a good time?

FR As-tu passe du bon temps?

IPA [a ty pase dy bɔ̃ tɑ̃ ||]

 

So that:

1. all lines beginning with IPA are removed

2. if the IPA line continues on the next line, that next line is removed, also.  (that is, delete everything until "EN"

3. If the line starting with FR continues on the next line, it removes the CR/LF so that the two lines become one line.

4. If the line starting with EN continues on the next line, it removes the CR/LF so that the two lines become one line.

5. Remove all lines that don't begin with EN or FR

6.  Create two columns where the first column has all lines that begin with EN (the english sentences)

and the second column has all of the lines that begin with FR (the french sentences)

 

So as you can see, I have files that have an English Sentence followed by a French Sentence followed by the pronunciation, and I am trying to transform them into files that I can use for Anki or Anymemo flashcards.

 

I can do bits and pieces of this, but the code to concatenate the lines and remove the second line of the pronunciation elude me.

 

All help appreciated!

Rsquest

 


  • 0

Advertisements


#2
Rsquest

Rsquest

    New Member

  • Topic Starter
  • Member
  • Pip
  • 2 posts

This could be an Excel Macro instead. 


  • 0






Similar Topics


Also tagged with one or more of these keywords: Word macro, Word, Macro

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP