Professional Documents
Culture Documents
Sample Set Macros
Sample Set Macros
ActiveDocument.Select
Selection.WholeStory
Selection.LanguageID = wdEnglishUS
ActiveDocument.CheckSpelling
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End Sub
Sub FindMultiItemsInDoc()
Dim objListDoc As Document
Dim objTargetDoc As Document
Dim objParaRange As Range, objFoundRange As Range
Dim objParagraph As Paragraph
With Selection
.HomeKey Unit:=wdStory
Sub Macro9()
'
' Macro9 Macro
' enable editing permanently
'
ChangeFileOpenDirectory "D:\"
ActiveDocument.SaveAs2 FileName:="Test.doc", FileFormat:=wdFormatDocument, _
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False, CompatibilityMode:=0
ActiveWindow.Close
Application.Quit
End Sub
Sub Macro300()
'
' Macro300 Macro
' delete comments, accept all changes, correct grammar, and save
'
Dim n As Long
Dim oComments As Comments
Set oComments = ActiveDocument.Comments
For n = oComments.Count To 1 Step -1
oComments(n).Delete
Next 'n
Set oComments = Nothing
ActiveDocument.PageSetup.Orientation = wdOrientLandscape
ActiveDocument.ShowGrammaticalErrors = False
ActiveDocument.ShowSpellingErrors = False
ActiveDocument.Range.NoProofing = True
ActiveDocument.AcceptAllRevisions
ActiveDocument.TrackRevisions = False
ActiveDocument.Save
ActiveWindow.Close
End Sub
Sub Macro302()
'
' Macro302 Macro
' finale
'
Dim file
Dim path As String
path = "C:\Users\nnadkarni\Desktop\PayGate\"
file = Dir()
Loop
End Sub