Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-11-2023, 12:37 PM
peterz peterz is offline Removing lines from an MS Teams transcription document Windows 10 Removing lines from an MS Teams transcription document Office 2021
Novice
Removing lines from an MS Teams transcription document
 
Join Date: Oct 2023
Posts: 3
peterz is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 10-11-2023, 02:29 PM
Guessed's Avatar
Guessed Guessed is offline Removing lines from an MS Teams transcription document Windows 10 Removing lines from an MS Teams transcription document Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
You could shorten the search string it to remove 'joined' to get rid of both in one pass but you might lose some desired paragraphs in friendly fire. You could also repeat the full code to get the 'left the meeting' paragraphs.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 10-12-2023, 06:35 AM
peterz peterz is offline Removing lines from an MS Teams transcription document Windows 10 Removing lines from an MS Teams transcription document Office 2021
Novice
Removing lines from an MS Teams transcription document
 
Join Date: Oct 2023
Posts: 3
peterz is on a distinguished road
Default 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
Reply With Quote
  #4  
Old 10-12-2023, 07:42 PM
Guessed's Avatar
Guessed Guessed is offline Removing lines from an MS Teams transcription document Windows 10 Removing lines from an MS Teams transcription document Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #5  
Old 10-13-2023, 06:48 AM
peterz peterz is offline Removing lines from an MS Teams transcription document Windows 10 Removing lines from an MS Teams transcription document Office 2021
Novice
Removing lines from an MS Teams transcription document
 
Join Date: Oct 2023
Posts: 3
peterz is on a distinguished road
Default Thank You

Andrew,

Sincere thanks for the help with macros.

Pete
Reply With Quote
Reply



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 from an MS Teams transcription document Removing Lines / Tables with Blank Data Crosby87 Mail Merge 33 07-16-2019 02:24 AM
Removing lines from an MS Teams transcription document 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

Other Forums: Access Forums

All times are GMT -7. The time now is 02:59 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft