Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

copycat update

  • Loading branch information...
commit 1b089eaf34dd64dd3fbf2d9b31f724bcf0ffd36f 1 parent 0daef50
@tmoore82 authored
Showing with 39 additions and 1 deletion.
  1. +39 −1 CopyCat.txt
  2. 0  word-macros2.readme → readme
View
40 CopyCat.txt
@@ -44,6 +44,12 @@
' ActiveDocument.Sections(n).Footers(wdHeaderFooterPrimary). _
' PageNumbers.NumberStyle = wdPageNumberStyleLowercaseRoman
+'b
+
+ 'show/hide bookmarks
+
+ 'ActiveWindow.View.ShowBookmarks = True/False
+
'c
'call macro
@@ -162,7 +168,11 @@
'h
- ' how "with" works
+ 'highlight
+ Selection.Range.HighlightColorIndex = wdYellow
+ Selection.Range.HighlightColorIndex = wdNoHighlight
+
+ 'how "with" works
' "with string.string" tells VBA that the following lines ".string=" should be appended to the same string. this eliminates the need to repeat the string
@@ -316,6 +326,12 @@
'
+ 'select all shapes
+
+ 'Sub SelectShapes()
+ 'ActiveDocument.Shapes.SelectAll
+ 'End Sub
+
'space
' Selection.TypeText Text:=Chr(32)
@@ -323,6 +339,28 @@
't
+ 'insert a table, turn borders on, go to the first cell
+
+ 'Dim myRange As Range
+ 'Set myRange = ActiveDocument.Range(Start:=0, End:=0)
+
+ 'Dim oTbl
+' Set oTbl = ActiveDocument.Tables.Add(Range:=myRange, NumRows:=10, NumColumns:=6)
+
+ 'With oTbl
+ ' .Borders(wdBorderTop).LineStyle = wdLineStyleSingle
+ ' .Borders(wdBorderLeft).LineStyle = wdLineStyleSingle
+ ' .Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
+ ' .Borders(wdBorderRight).LineStyle = wdLineStyleSingle
+ ' .Borders(wdBorderHorizontal).LineStyle = wdLineStyleSingle
+ ' .Borders(wdBorderVertical).LineStyle = wdLineStyleSingle
+ ' '.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleSingle
+ ' '.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleSingle
+ ' End With
+
+'ActiveDocument.Tables(1).Cell(Row:=1, Column:=1).Range.Select
+'Selection.Collapse
+
'toggle fields on/off
'ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes
View
0  word-macros2.readme → readme
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.