![]() |
|
#1
|
|||
|
|||
![]() I've tried to record a macro that will assign aliases to certain styles. It doesn't work. The reason I want to do this is every time something goes wrong with my computer, it is blamed on my Normal.dot and my normal gets wiped out and reinitialized by my office OST's (office support techs), which then of course wipes out all my aliases and then I have to go in and put them all back. Any way to do this? Thanks for your help. |
#2
|
||||
|
||||
![]()
Hi jerem,
Have you considered making a backup of your Normal.dot? That would require less effort than creating a macro (which, presumably you'd store in Normal.dot anyway - and risk its deletion). Otherwise, you'll need to provide something more descriptive than 'It doesn't work' - like a copy of your code, details of any error messages and the code lines affected, etc.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
As mentioned previously, the reason backing up my Normal.dot won't work is when I call my company IT Help Desk when having problems and they send an OST guy over to investigate, they invariably say that my Normal.dot is corrupt and that is why I'm having problems with this, that and the other. So what they tend to do is kill my Normal.dot and open up Word and allow it to rebuild (or initialize a new Normal.dot). If I kill the new initialized Normal.dot and put my backed-up Normal.dot back and then experience those problems again and have to call IT again, they're going to come up with the same solution, which is again to kill my Normal.dot and reinitialize. That is why all of my macros that I daily use are in an Add-In Template.
The thing is there are company styles that we use. Some have been given aliases and some others have not. I have assigned aliases to those others (that don't have an aliases assigned) that I frequently use, but they always get removed when reinitializing. So I thought maybe if I have a macro that will assign those aliases in one shot rather than me having to go in there and do that all over again, however this is one macro that won't generate using "Record a Macro". Here's what it generates, which doesn't do anything (that's what I meant by it doesn't work - this does nothing when you run it). Sub Macro1() ' ' Macro1 Macro ' With ActiveDocument.Styles("_1.0sp Centered") .AutomaticallyUpdate = False .BaseStyle = "Normal" .NextParagraphStyle = "_1.0sp Centered" End With With ActiveDocument.Styles("_1.0sp Centered (no space after)") .AutomaticallyUpdate = False .BaseStyle = "Normal" .NextParagraphStyle = "_1.0sp Centered (no space after)" End With End Sub Another thought is this: should I assign those aliases in my Add-In Template, which contains the company styles? Maybe that will solve this problem???? Thanks for your help. |
#4
|
||||
|
||||
![]()
OK, but what aliases are the code supposed to apply? Simply posting code you've recorded without saying what it's meant to do isn't much help.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
ibclare | Office | 4 | 06-02-2011 03:22 PM |
Equally allocate/assign across resouces | chconnors | Project | 1 | 06-01-2011 03:27 AM |
Can you assign a number to a slide and call it up? | satchmo | PowerPoint | 1 | 07-26-2010 06:27 AM |
Can't Assign Shortcut Keys | Vicki F. | Word | 0 | 04-17-2010 03:03 PM |
Assign name to a group in word document | pankaj_saha | Word | 0 | 11-12-2009 10:59 PM |