Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-20-2010, 11:49 PM
oluc oluc is offline Macro not staying true Windows 7 Macro not staying true Office 2007
Novice
Macro not staying true
 
Join Date: Nov 2010
Posts: 3
oluc is on a distinguished road
Default Macro not staying true

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?
Reply With Quote
  #2  
Old 11-21-2010, 02:35 AM
Kimberly Kimberly is offline Macro not staying true Windows 7 Macro not staying true Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

Quote:
do you know whats occurring here?
It sounds like your macro only formats the active paragraph, but since you didn't post the code, its hard to say.
Reply With Quote
  #3  
Old 11-21-2010, 02:39 AM
oluc oluc is offline Macro not staying true Windows 7 Macro not staying true Office 2007
Novice
Macro not staying true
 
Join Date: Nov 2010
Posts: 3
oluc is on a distinguished road
Default

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
Reply With Quote
  #4  
Old 11-21-2010, 08:08 AM
Kimberly Kimberly is offline Macro not staying true Windows 7 Macro not staying true Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

There are 7 macros there. Which one are you running?
Reply With Quote
  #5  
Old 11-21-2010, 08:10 AM
oluc oluc is offline Macro not staying true Windows 7 Macro not staying true Office 2007
Novice
Macro not staying true
 
Join Date: Nov 2010
Posts: 3
oluc is on a distinguished road
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro not staying true 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
Macro not staying true Word 2007 Password not staying after file transfer. grumalt Word 1 04-17-2009 12:30 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:21 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft