![]() |
|
#1
|
|||
|
|||
|
hi there!
I have set up a macro to adjust the setting of word. I click on it and it works - changes all of the settings how they should be... i type the first line in word and its as it should be but when i click enter and go the the next line the settings change back to my default settings.. why!?? ![]() i have not been able to figure out how to keep the macro settings for the life of me! do you know whats occurring here? |
|
#2
|
|||
|
|||
|
Quote:
|
|
#3
|
|||
|
|||
|
oh, okay.
here is the code: Code:
Sub Typing()
On Error Resume Next
' Format Macro
' Macro recorded 11/4/2005 by .
'
Selection.WholeStory
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.WholeStory
Selection.Font.Name = "Arial"
Selection.Font.Name = "Arial"
Selection.Font.Size = 14
Selection.ParagraphFormat = Space15
With AutoCorrect
.CorrectInitialCaps = True
.CorrectSentenceCaps = False
.CorrectDays = True
.CorrectCapsLock = True
.ReplaceText = True
.ReplaceTextFromSpellingChecker = True
.CorrectKeyboardSetting = False
End With
With Options
.AutoFormatAsYouTypeApplyHeadings = False
.AutoFormatAsYouTypeApplyBorders = False
.AutoFormatAsYouTypeApplyBulletedLists = False
.AutoFormatAsYouTypeApplyNumberedLists = False
.AutoFormatAsYouTypeApplyTables = False
.AutoFormatAsYouTypeReplaceQuotes = True
.AutoFormatAsYouTypeReplaceSymbols = True
.AutoFormatAsYouTypeReplaceOrdinals = True
.AutoFormatAsYouTypeReplaceFractions = True
.AutoFormatAsYouTypeReplacePlainTextEmphasis = True
.AutoFormatAsYouTypeReplaceHyperlinks = True
.AutoFormatAsYouTypeFormatListItemBeginning = False
.AutoFormatAsYouTypeDefineStyles = False
End With
Application.DisplayAutoCompleteTips = True
With Options
.AutoFormatApplyHeadings = False
.AutoFormatApplyLists = False
.AutoFormatApplyBulletedLists = False
.AutoFormatApplyOtherParas = False
.AutoFormatReplaceQuotes = True
.AutoFormatReplaceSymbols = True
.AutoFormatReplaceOrdinals = True
.AutoFormatReplaceFractions = True
.AutoFormatReplacePlainTextEmphasis = True
.AutoFormatReplaceHyperlinks = True
.AutoFormatPreserveStyles = False
.AutoFormatPlainTextWordMail = False
End With
With ActiveDocument.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.TopMargin = InchesToPoints(1)
.BottomMargin = InchesToPoints(1)
.LeftMargin = InchesToPoints(1.25)
.RightMargin = InchesToPoints(1.25)
.Gutter = InchesToPoints(0)
.HeaderDistance = InchesToPoints(0.5)
.FooterDistance = InchesToPoints(0.5)
.PageWidth = InchesToPoints(8.5)
.PageHeight = InchesToPoints(11)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
.TwoPagesOnOne = False
.GutterPos = wdGutterPosLeft
End With
With ActiveDocument.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.TopMargin = InchesToPoints(1)
.BottomMargin = InchesToPoints(1)
.LeftMargin = InchesToPoints(1.25)
.RightMargin = InchesToPoints(1.25)
.Gutter = InchesToPoints(0)
.HeaderDistance = InchesToPoints(0.5)
.FooterDistance = InchesToPoints(0.5)
.PageWidth = InchesToPoints(8.5)
.PageHeight = InchesToPoints(14)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
.TwoPagesOnOne = False
.GutterPos = wdGutterPosLeft
End With
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type <> wdPrintView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
With Selection.PageSetup.TextColumns
.SetCount NumColumns:=1
.EvenlySpaced = False
.LineBetween = False
End With
Selection.WholeStory
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type <> wdPrintView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
With Selection.PageSetup.TextColumns
.SetCount NumColumns:=1
.EvenlySpaced = False
.LineBetween = False
End With
Macro1
End Sub
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 12/11/2005 by Administrator
'
With ActiveDocument.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.TopMargin = InchesToPoints(1)
.BottomMargin = InchesToPoints(0.25)
.LeftMargin = InchesToPoints(1)
.RightMargin = InchesToPoints(1)
.Gutter = InchesToPoints(0)
.HeaderDistance = InchesToPoints(0.5)
.FooterDistance = InchesToPoints(0.5)
.PageWidth = InchesToPoints(8.5)
.PageHeight = InchesToPoints(14)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionContinuous
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = True
.MirrorMargins = False
.TwoPagesOnOne = False
.GutterPos = wdGutterPosLeft
Selection.WholeStory
Selection.Font.Name = "Arial"
Selection.Font.Name = "Arial"
Selection.Font.Size = 14
End With
End Sub
Sub Macro1()
'
On Error Resume Next
' Macro1 Macro
' Macro recorded 12/11/2005 by Administrator
'
Selection.WholeStory
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.WholeStory
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type <> wdPrintView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
With ActiveDocument.PageSetup.TextColumns
.SetCount NumColumns:=1
.EvenlySpaced = True
.LineBetween = False
.Width = InchesToPoints(6)
End With
Macro2
End Sub
Sub lines()
'
' lines Macro
' Macro recorded 3/15/2006 by Administrator
'
Selection.TypeText Text:="____ ____ ____"
End Sub
Sub line()
'
' line Macro
' Macro recorded 3/16/2006 by Administrator
'
Selection.TypeText Text:="_______________"
End Sub
Sub UpperCaseAll()
'
' UpperCaseAll Macro
' Macro recorded 4/27/2007 by Administrator
'
Selection.WholeStory
Selection.Range.Case = wdUpperCase
End Sub
End Sub
|
|
#4
|
|||
|
|||
|
There are 7 macros there. Which one are you running?
|
|
#5
|
|||
|
|||
|
thanks for the att.
i figured it out - i had the "Style for following paragraph:" set wrongly and thats what was causing to to change styles when i hit return. |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Help with a macro
|
Takket | Word VBA | 2 | 03-28-2014 04:58 PM |
| need a macro that does the following | atomsk | Word VBA | 0 | 07-05-2010 07:29 AM |
| Please help | Jarrod | Word | 1 | 06-05-2010 06:31 AM |
| Macro help | NEHicks503 | Excel | 0 | 04-16-2010 07:29 AM |
Word 2007 Password not staying after file transfer.
|
grumalt | Word | 1 | 04-17-2009 12:30 PM |