Problems with macro not executing properly

Discussion, questions and support.
Post Reply
julietaylor
Posts: 4
Joined: Oct 30th, ’19, 12:31

Post by julietaylor » Sep 6th, ’22, 15:51

I want to create a macro that will find and replace the semicolon (;) with a line break in a MS Outlook email. I've tried entering the keystrokes in an automation and also tried recording a macro (multiple times)...neither has worked.

Can anyone give me feedback on what I'm doing wrong?

Here's the steps:

I have an email open in word with text that has semicolons in it. I highlight the text and then want the macro to do these steps:
  • CTRL+H
    ;
    ^p
    ALT+A
    ALT+N
    ESCAPE
Thank you for any direction you can provide,
Julie
User avatar
Marko
Posts: 1719
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Sep 6th, ’22, 17:10

You can do this instead: Set a shortcut (Type: Command):

Code: Select all

Clipboard:=""
Send, ^c
ClipWait
string:=clipboard
stringreplace, string, string, ;, `n, all
SendInput, % string
Select the text and press the shortcut.
Post Reply