Skip to content
Browse files

New Clear-All-Bkmks

  • Loading branch information...
1 parent e042be7 commit 6d622c3b47feb7de1a6f0c0dad0d5ebfda6db3aa @tmoore82 committed
Showing with 65 additions and 1 deletion.
  1. +21 −0 Clear-All-Bkmks.txt
  2. +44 −1 CopyCat.txt
View
21 Clear-All-Bkmks.txt
@@ -0,0 +1,21 @@
+Sub ClearBkmksSimple_NT()
+'Version v1.0
+'tmoore82
+'10/01/12
+
+'Simplest way I could find to clear all bookmarks from a document quickly.
+
+Dim n As Integer
+Dim nCurrentBookmark As Integer
+Dim nTotalBookmarks As Integer
+
+n = 1
+nTotalBookmarks = ActiveDocument.Bookmarks.Count
+nCurrentBookmark = 1
+
+Do Until nCurrentBookmark > nTotalBookmarks
+ ActiveDocument.Bookmarks(n).Delete
+ nCurrentBookmark = nCurrentBookmark + 1
+Loop
+
+End Sub
View
45 CopyCat.txt
@@ -24,6 +24,8 @@
'Chr(32) = Space ( )
'chr(33) = exclamation point (!)
'Chr(34) = quotation mark (straight) (")
+ 'chr(40) = open parenthesis (
+ 'chr(41) = close parenthesis )
'chr(46) = period (.)
'chr(58) = colon (:)
'chr(63) = question mark (?)
@@ -59,6 +61,35 @@
'carriage return
' Selection.TypeText Text:=Chr(9)
+
+ 'casting
+
+ 'CInt(variable) 'to cast as integer
+ 'CStr(variable) 'to cast as string
+
+ 'CBool(expression)
+
+ 'CByte(expression)
+
+ 'CCur(expression)
+
+ 'CDate(expression)
+
+ 'CDbl(expression)
+
+ 'CDec(expression)
+
+ 'CInt(expression)
+
+ 'CLng(expression)
+
+ 'CSng(expression)
+
+ 'CStr(expression)
+
+ 'CVar(expression)
+
+
'convert integer to string
@@ -141,7 +172,8 @@
'formats
- ' wdOpenFormatAllWord A Microsoft Word format that is backward compatible with earlier versions of Microsoft Word.
+ ' wdOpenFormatAllWord A Microsoft Word format that is backward compatible with earlier versions of Microsoft Word.
+
' wdOpenFormatAuto The existing format.
' wdOpenFormatDocument Microsoft Word format.
' wdOpenFormatEncodedText Encoded text format.
@@ -152,6 +184,10 @@
' wdOpenFormatWebPages HTML format.
' wdOpenFormatXML XML format.
+ 'full path and file name
+
+ 'ActiveDocument.FullName
+
'g
@@ -264,6 +300,13 @@
'Documents.Open FileName:=DesDoc
'p
+
+ 'paste
+
+ 'paste with original formatting
+
+ ' Selection.PasteAndFormat (wdFormatOriginalFormatting)
+
'progress bar (from existing form and code)
'UserForm ProgressBar must already exist

0 comments on commit 6d622c3

Please sign in to comment.
Something went wrong with that request. Please try again.