▲ 3 r/vba

[WORD] Find and replace from this point onwards

I found this code below to find and replace words that are stored in a table in a separate document.

What i wish to do is to find and replace only after where the cursor is, instead of running through the entire document. How can the code be modified?

Sub CleanUp()

' ReplaceFromTableList Macro

' from Doug Robbins, Word MVP, Microsoft forums, Feb 2015, based on another macro written by Graham Mayor, Aug 2010

Dim oChanges As Document, oDoc As Document

Dim oTable As Table

Dim oRng As Range

Dim rFindText As Range, rReplacement As Range

Dim i As Long

Dim sFname As String

'Change the path in the line below to reflect the name and path of the table document

sFname = "C:\Users\Me\Documents\CleanUp.docx"

Set oDoc = ActiveDocument

Set oChanges = Documents.Open(FileName:=sFname, Visible:=False)

Set oTable = oChanges.Tables(1)

For i = 1 To oTable.Rows.Count

Set oRng = oDoc.Range

Set rFindText = oTable.Cell(i, 1).Range

rFindText.End = rFindText.End - 1

Set rReplacement = oTable.Cell(i, 2).Range

rReplacement.End = rReplacement.End - 1

Selection.HomeKey wdStory

With oRng.Find

.ClearFormatting

.Replacement.ClearFormatting

.MatchWildcards = True

.MatchCase = False

.MatchWholeWord = True

.Text = rFindText.Text

.Replacement.Text = rReplacement.Text

.Forward = True

.Wrap = wdFindContinue

.Execute Replace:=wdReplaceAll

End With

Next i

oChanges.Close wdDoNotSaveChanges

End Sub

reddit.com
u/Fluffy-Singer-9354 — 12 days ago

texting late friend's husband on his/her birthday?

i lost a friend in august. i'm only friends with her husband through her, but we've since exchanged numbers through mutual contacts. his birthday is later this year. i'd normally wish him happy birthday through her, but it was more to let her know i cared and i dont know if she actually conveyed the message to him. should i text him on his birthday this year? or on her birthday next year?

reddit.com
u/Fluffy-Singer-9354 — 1 month ago

icloud link of shared album loses custom sorting

I'm (still) using an iPhone 7 with iOS 15.8.8.

I created an album with custom sorting, then clicked "Add to Shared Album".

The shared album keeps my custom sorting. But when I share the link of the shared album, the icloud website loses my custom sorting and instead displays the photos in chronological order.

I've also tried just clicking on "Copy iCloud Link" on the (un-shared) album and the custom sorting is gone from that too.

Is there a workaround for this?

reddit.com
u/Fluffy-Singer-9354 — 3 months ago

MOELC Malay as a Third Language Textbooks for self-learning?

I'm an adult and thinking of picking up second hand versions of "Fasih Bahasa" Books 1 to 4 to learn Malay. Has anyone done the same and what do you think of these books for self-learning?

reddit.com
u/Fluffy-Singer-9354 — 3 months ago

YouTube channels with karaoke-like transcripts?

I have seen YouTube channels where one can follow along a dialogue or narrative with a hangul transcript.

Are there any where the word or character spoken is simultaneously highlighted or underlined in the transcript, just like how it is with karaoke lyrics?

reddit.com
u/Fluffy-Singer-9354 — 4 months ago

Official 20W Apple charger with folding prongs for use in China?

I only see these two chargers with folding pins on the China Apple Store: 35W (dual USB C) and 40W (single USB C).

I'll only be charging a phone and prefer something that won't get too hot. Did Apple ever release an official 20W Apple charger with single USB C and folding prongs for use in China?

reddit.com
u/Fluffy-Singer-9354 — 5 months ago