View Single Post
 
Old 03-29-2019, 12:31 AM
Chibiberu Chibiberu is offline Windows 7 64bit Office 2013
Novice
 
Join Date: May 2014
Location: Japan
Posts: 11
Chibiberu is on a distinguished road
Default Please help! Macros not recorded as expected

Hi!

I am totally novice in macros and VBA.

I want to create a macro that will operate about 30 find/replace steps.
The first find/replace I need to do consist in replacing a non printable (#0D) character which first occurrence is always located at the same position in the file.
All other find/replace steps
So I decided to create a macro using the "Record macro..." command.
But almost no step I operate is recorded.
For instance, after a succession of about 30 "find/replace" steps, I only get this in the macro:
Sub Macro1()
'
' Macro1 Macro
'
'
Selection.Copy
End Sub
Some times I only get the last Find/Replace step
I tried several times, but only oner step is recorded in the macro (and not always the same step!!!)


So, I have a few questions:


1. Is it normal that actions I did after I started recording the macro are not recorded?
(for instance: the action of selecting a certain character at a certain location in the file, or all Replace actions I did...)


2. Is it possible to add a VBA step that will automatically select a character that is always located at the same place in the file?


3. How can I perform a Find/Replace step that finds all occurrences of #0D character and replaces them by something else? (i.e. paragraph break + "&&&" sequence)

Many thanks in advance

Last edited by Chibiberu; 03-30-2019 at 12:19 AM.
Reply With Quote