#1
|
|||
|
|||
Removing lines from an MS Teams transcription document
Hello. I used the real-time feature of Teams to get a transcript of a meeting. I would like to use a Microsoft Word macro to remove each instance where a person has either joined or left a meeting. The document contains lines such as: Doe, John joined the meeting Smith, Sally joined the meeting Sullivan, Ed left the meeting Can a macro be used to remove all instances in a document? I can remove the words "joined the meeting" but can't figure out how to include each individuals name as well. Thanks in advance. Pete |
#2
|
||||
|
||||
This code will remove all the 'joined the meeting' paragraphs.
Code:
Sub RemoveJoin() Dim oRng As Range, iType As Integer Set oRng = ActiveDocument.Range With oRng.Find .ClearFormatting .Text = "joined the meeting^p" While .Execute oRng.Paragraphs(1).Range.Delete Wend End With End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Thanks very much
This works great for "joined". How would I repeat the code to remove "left the meeting"? Would I just append it to the end of this code?
Sorry, I'm not a Word macro expert. Very grateful for your help. Pete |
#4
|
||||
|
||||
The quick and dirty way is to repeat the relevant code. I'm sure if I thought hard enough it could be made more elegant but I haven't the time today
Code:
Sub RemoveJoin() Dim oRng As Range, iType As Integer Set oRng = ActiveDocument.Range With oRng.Find .ClearFormatting .Text = "joined the meeting^p" While .Execute oRng.Paragraphs(1).Range.Delete Wend End With Set oRng = ActiveDocument.Range With oRng.Find .ClearFormatting .Text = "left the meeting^p" While .Execute oRng.Paragraphs(1).Range.Delete Wend End With End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#5
|
|||
|
|||
Thank You
Andrew,
Sincere thanks for the help with macros. Pete |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to create teams (with both material and work) of resources and assign those teams in tasks? | Gustavo97 | Project | 0 | 08-19-2022 02:41 AM |
Replacing/Removing XML file lines | Rolo18 | Word VBA | 2 | 07-01-2020 05:07 PM |
Removing Lines / Tables with Blank Data | Crosby87 | Mail Merge | 33 | 07-16-2019 02:24 AM |
Removing a strange object from a document | DJRiter | Word | 3 | 07-19-2016 04:38 AM |
Urgent help needed with removing blank lines... | iammom2four | Outlook | 0 | 12-15-2010 06:12 AM |