|
1
|
- By Ruth Helwig, Systems Librarian
- Central Michigan University
- February 1, 2007
|
|
2
|
- A macro is a way to record repetitive keystrokes to avoid retyping.
- A macro can save you time.
- A macro can be simple or tricky to create.
|
|
3
|
- Microsoft Word
- Microsoft Excel
- Microsoft Access – to some extent
- III’s Millennium
- Anzio
- Connexion
|
|
4
|
|
|
5
|
- Patterns in the content
- Watch for uniqueness
- Order of commands –
- A change will change everything that matches the pattern.
- Changing “cat” to “gray cat” will also change “category” to “gray
category”
- May need to change something and change it back
|
|
6
|
- Marcos in III are saved by Login on the server.
- Macros in Anzio and Connexion Client are located on your computer.
- Macros in MSWord and Excel are on your computer.
- TIP – Once the macro is created and working, make a copy of the steps in
case it is lost.
|
|
7
|
- 030673 .b14575693 700 1b 1994
A^10 Newell, Charles J.^
- 011116 .b14368808 700 1b 1991
A^10:Schumacher, Vic.^
- 002535 .b1162355x 700 0b 1975
A^A 17th Century Tourist.^
- 042393 .b1151565x 700 0b 1828
A^A citizen of New-England.^
- 030189 .b13504319 700 0b 1928
A^A citizen of Paris.^
- 018285 .b12852466 700 0b 1957
A^A co-founder.^
- 047497 .b11037222 600 10 1969
A^a Copland, Aaron,^D^1900-1990.^T^Concertos,^M^clarinet, string orchestra.^
- 029946 .b12442197 700 0b 1970
A^A F. R. G. S.^
- 044979 .b1716154x 700 0b 1971
A^A gentleman.^
- 021317 .b16859388 700 0b 2001
A^a Kamalasila,^D^fl. 713-763.^T^Bhavanakrama.^L^Sanskrit &
Tibetan.^
- 038661 .b1841896x 100 0b 1851
A^A. Novice.^
- 045056 .b17162324 700 0b 1972
A^A victim.^
- 048818 .b1585372x 600 10 A^A. Walthew & Sons (Detroit,
Mich.)^
- 003964 .b11638540 100 1b 1946
A^Aaberg, Gwendolyn M.^
- 036403 .b14100939 600 10 1991
A^Aakvik, Helmer,^D^d. 1987.^
- 020461 .b13401087 700 1b 1967
A^Aall, Ingrid.^
- 017050 .b10712471 700 1b 1980
A^Aandahl, Frederick.^
|
|
8
|
- Decide what you want to achieve.
- Change content
- Add content
- Examine the data for patterns.
- In this example:
- 6 digits followed by a space
- Space .b followed by 8 digits
- Space followed by 3 digits, etc.
- A^A
|
|
9
|
- Replace A^A with A
- Replace .b with TAB .b
- Remove all remaining carets ^
- Start a new line of text with the MARC tag
- Add “record number =“ before the bib record number.
|
|
10
|
- Choose Record
- Type the Find and Replace steps that you want the macro to perform.
- Stop and save the macro.
- In the future, you only need to run the macro.
- à Tools à Macro à Macros à select Macro à Run à Sit back and relax
|
|
11
|
|
|
12
|
|
|
13
|
|
|
14
|
- Sub recacq2()
- '
- ' recacq2 Macro
- ' Macro recorded 11/2/99 by 93735RuthHelwig
- '
- '
-
Columns("B:B").Select
- Selection.Replace
What:="<b>A ", Replacement:="<b>",
LookAt:=xlPart, _
- SearchOrder:=xlByRows,
MatchCase:=False
- Selection.Replace
What:="<b>The ",
Replacement:="<b>", LookAt:=xlPart, _
- SearchOrder:=xlByRows,
MatchCase:=False
- Selection.Replace
What:="<b>An ", Replacement:="<b>",
LookAt:=xlPart, _
- SearchOrder:=xlByRows,
MatchCase:=False
- Selection.Replace
What:="<b>The ", Replacement:="<b>",
LookAt:=xlPart, _
- SearchOrder:=xlByRows,
MatchCase:=False
- End Sub
|
|
15
|
|
|
16
|
- In Excel you can focus changes to a specific column, match case, or
match the entire cell contents
|
|
17
|
|
|
18
|
- Click “New” and you get a list of actions.
|
|
19
|
- Choose an action from the drop-down menu.
- Specify a source for the action.
Example:
- Action = Open
- Action = Maximize
- Source = III Problem Table
- Save and run the macro.
- The macro above would open and maximize the III Problem Table.
|
|
20
|
- MSAccess allows for Find and Replace functions specifying changes to portions
of a field.
|
|
21
|
- Tip sheet:
- http://www.lib.cmich.edu/staff/training/Macros.doc
|
|
22
|
|
|
23
|
- Insert string of text that you want to repeatedly enter.
- Enter a command such as %ENTER%n%TAB%Give to Ruth.
- This means:
- % = start or end a command
- ENTER = press the Enter key
- n = press “n” together with the ALT key. In this context it makes a note
field.
- %TAB% = Tab in the line
- Give to Ruth = Text to put in the field.
|
|
24
|
|
|
25
|
|
|
26
|
|
|
27
|
|
|
28
|
|
|
29
|
- See http://www.lib.cmich.edu/staff/anzio.htm
|
|
30
|
- Click CTRL-SHIFT-F
- You get
- Type “define”
- Press the key you want to define, i.e. F10
- Press the space bar
- Enter the command or text string à NEXT
- Press ENTER when you are done. SCREEN
|
|
31
|
|