Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: 14 Nov 2005 10:29:49 -0800,    group: microsoft.public.word.vba.customization        back       


Intercept Macro-Record Dialog   
Hi,
I would like to limit the macro functionality of Word 2003 in such a
way that users can save their macros only to a particular template,
different from normal.dot. Two ways come to my mind, either modify the
Macro-Record Dialog so that the "normal.dot" template is not shown, or
(better) not show such a dialog at all but directly record to the
specified template. However, both solutions seem to be impossible as
one cannot access the record macro functionality from within a macro.
Does anyone have an idea???

Thanks,
Winfried
date: 14 Nov 2005 10:29:49 -0800   author:   Winfried Rabenstein

Re: Intercept Macro-Record Dialog   
I haven't tried it, but my idea would be to have an AutoExec macro switch 
the customization context to your template. I don't know how sticky this 
setting is, but believe it stays set until something else changes it or you 
restart Word. This would _not_ keep the person from saving to normal.dot, 
but would change the default, if it works.
-- 
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
 --------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"Winfried Rabenstein"  wrote in message 
news:1131992989.083228.240950@z14g2000cwz.googlegroups.com...
> Hi,
> I would like to limit the macro functionality of Word 2003 in such a
> way that users can save their macros only to a particular template,
> different from normal.dot. Two ways come to my mind, either modify the
> Macro-Record Dialog so that the "normal.dot" template is not shown, or
> (better) not show such a dialog at all but directly record to the
> specified template. However, both solutions seem to be impossible as
> one cannot access the record macro functionality from within a macro.
> Does anyone have an idea???
>
> Thanks,
> Winfried
>
date: Mon, 14 Nov 2005 14:50:24 -0600   author:   Charles Kenyon

Re: Intercept Macro-Record Dialog   
Be very wary of the CustomizationContext setting. There is a sequence of 
events involving it that irretrievably corrupts the current template.



"Charles Kenyon"  wrote in 
message news:uiP8fBW6FHA.1248@TK2MSFTNGP14.phx.gbl...
>I haven't tried it, but my idea would be to have an AutoExec macro switch 
>the customization context to your template. I don't know how sticky this 
>setting is, but believe it stays set until something else changes it or you 
>restart Word. This would _not_ keep the person from saving to normal.dot, 
>but would change the default, if it works.
> -- 
> Charles Kenyon
>
> Word New User FAQ & Web Directory: http://addbalance.com/word
>
> Intermediate User's Guide to Microsoft Word (supplemented version of
> Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
>
> See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
> --------- --------- --------- --------- --------- ---------
> This message is posted to a newsgroup. Please post replies
> and questions to the newsgroup so that others can learn
> from my ignorance and your wisdom.
>
> "Winfried Rabenstein"  wrote in message 
> news:1131992989.083228.240950@z14g2000cwz.googlegroups.com...
>> Hi,
>> I would like to limit the macro functionality of Word 2003 in such a
>> way that users can save their macros only to a particular template,
>> different from normal.dot. Two ways come to my mind, either modify the
>> Macro-Record Dialog so that the "normal.dot" template is not shown, or
>> (better) not show such a dialog at all but directly record to the
>> specified template. However, both solutions seem to be impossible as
>> one cannot access the record macro functionality from within a macro.
>> Does anyone have an idea???
>>
>> Thanks,
>> Winfried
>>
>
>
date: Tue, 15 Nov 2005 09:35:21 +1100   author:   Jezebel

Re: Intercept Macro-Record Dialog   
Please inlight us - how is it corrupting the current template? I am
asking because I am building a menu by code and this corrupts my
template to (and Microsoft are working on the problem, but I have not
seen a solution yet)

Richardt
Teknologisk Institut (Denmark)
date: 15 Nov 2005 01:30:47 -0800   author:   RichardtVejeMadsen

Re: Intercept Macro-Record Dialog   
I didn't pursue this in detail (I got sick of restoring templates from 
backup), but the sequence was along the lines of --

1.  Make a toolbar change to template A
2. Set the CustomizationContext to template B
3. Reset the toolbar change to template A.

At this point template B disintegrates. I'm sorry I can't recall further 
detail. At the time, we just decided to work around the problem entirely and 
design out the need to use the context at all.






"RichardtVejeMadsen"  wrote in message 
news:1132047046.994480.208420@g14g2000cwa.googlegroups.com...
> Please inlight us - how is it corrupting the current template? I am
> asking because I am building a menu by code and this corrupts my
> template to (and Microsoft are working on the problem, but I have not
> seen a solution yet)
>
> Richardt
> Teknologisk Institut (Denmark)
>
date: Tue, 15 Nov 2005 22:16:33 +1100   author:   Jezebel

Re: Intercept Macro-Record Dialog   
I'm interested in pursuing this further.

There are certainly some 'funnies' with toolbar customization but I wasn't
aware of any problems with Customization Context per se.

Jezebel - How do you reset toolbar changes in template A after changing
customization context to template B?

Richardt - Any chance you could give a brief description of the steps you
are taking.

--
Enjoy,
Tony


"Jezebel"  wrote in message
news:eQVXHYd6FHA.744@TK2MSFTNGP10.phx.gbl...
> I didn't pursue this in detail (I got sick of restoring templates from
> backup), but the sequence was along the lines of --
>
> 1.  Make a toolbar change to template A
> 2. Set the CustomizationContext to template B
> 3. Reset the toolbar change to template A.
>
> At this point template B disintegrates. I'm sorry I can't recall further
> detail. At the time, we just decided to work around the problem entirely
and
> design out the need to use the context at all.
>
>
>
>
>
>
> "RichardtVejeMadsen"  wrote in message
> news:1132047046.994480.208420@g14g2000cwa.googlegroups.com...
> > Please inlight us - how is it corrupting the current template? I am
> > asking because I am building a menu by code and this corrupts my
> > template to (and Microsoft are working on the problem, but I have not
> > seen a solution yet)
> >
> > Richardt
> > Teknologisk Institut (Denmark)
> >
>
>
date: Tue, 15 Nov 2005 12:57:07 -0000   author:   Tony Jollans My Forename at My Surname dot com

Re: Intercept Macro-Record Dialog   
Hi Winfried,

Your options when recording a macro are:

(a) Normal Template
(b) ActiveDocument
(c) ActiveDocument's Template (if different from Normal)

You can't record directly to a global template so what exactly are you
looking to do?

--
Enjoy,
Tony


"Winfried Rabenstein"  wrote in message
news:1131992989.083228.240950@z14g2000cwz.googlegroups.com...
> Hi,
> I would like to limit the macro functionality of Word 2003 in such a
> way that users can save their macros only to a particular template,
> different from normal.dot. Two ways come to my mind, either modify the
> Macro-Record Dialog so that the "normal.dot" template is not shown, or
> (better) not show such a dialog at all but directly record to the
> specified template. However, both solutions seem to be impossible as
> one cannot access the record macro functionality from within a macro.
> Does anyone have an idea???
>
> Thanks,
> Winfried
>
date: Tue, 15 Nov 2005 13:02:47 -0000   author:   Tony Jollans My Forename at My Surname dot com

Re: Intercept Macro-Record Dialog   
As I said, I can't remember this in detail, but something like --

- Create Template A. Add a toolbar to it, with some buttons on it. Save and 
close.

- Create a document using template A. The custom toolbar is displayed. Make 
a change to it.

- Set the CustomizationContext to template B.

- Undo the change to the template A toolbar.


Zappo.





"Tony Jollans" <My Forename at My Surname dot com> wrote in message 
news:OZ2$3Qe6FHA.2192@TK2MSFTNGP14.phx.gbl...
> I'm interested in pursuing this further.
>
> There are certainly some 'funnies' with toolbar customization but I wasn't
> aware of any problems with Customization Context per se.
>
> Jezebel - How do you reset toolbar changes in template A after changing
> customization context to template B?
>
> Richardt - Any chance you could give a brief description of the steps you
> are taking.
>
> --
> Enjoy,
> Tony
>
>
> "Jezebel"  wrote in message
> news:eQVXHYd6FHA.744@TK2MSFTNGP10.phx.gbl...
>> I didn't pursue this in detail (I got sick of restoring templates from
>> backup), but the sequence was along the lines of --
>>
>> 1.  Make a toolbar change to template A
>> 2. Set the CustomizationContext to template B
>> 3. Reset the toolbar change to template A.
>>
>> At this point template B disintegrates. I'm sorry I can't recall further
>> detail. At the time, we just decided to work around the problem entirely
> and
>> design out the need to use the context at all.
>>
>>
>>
>>
>>
>>
>> "RichardtVejeMadsen"  wrote in message
>> news:1132047046.994480.208420@g14g2000cwa.googlegroups.com...
>> > Please inlight us - how is it corrupting the current template? I am
>> > asking because I am building a menu by code and this corrupts my
>> > template to (and Microsoft are working on the problem, but I have not
>> > seen a solution yet)
>> >
>> > Richardt
>> > Teknologisk Institut (Denmark)
>> >
>>
>>
>
>
date: Wed, 16 Nov 2005 07:36:11 +1100   author:   Jezebel

Re: Intercept Macro-Record Dialog   
Tony Jollans schrieb:

> Hi Winfried,
>
> Your options when recording a macro are:
>
> (a) Normal Template
> (b) ActiveDocument
> (c) ActiveDocument's Template (if different from Normal)
>
> You can't record directly to a global template so what exactly are you
> looking to do?
>
> --
> Enjoy,
> Tony
>

Hi Tony,

thanks for stating this so clearly, I thought I understood this, but
was not 100% sure. The thing with the context change discussed here
appears too dangerous for me, and does not really solve my problem.

We change from WordPerfect 6.1 (!!! 10 years old) to Word, and I am
somewhat frustrated to see that what is easy to realize in WP in
different ways does not seem to be possible in Word.

We have a lot of users running a certain Word application (call it
"App") based on a particular template (AppTemplate, limiting largely
the formatting possibilities and containing functionality / macros).
This template is regularly updated , i.e. the users must absoultely not
save macros on this template (would be lost during update). However, I
do not like the users to save macros (which are only relevant for App)
on the general normal.dot, either. In fact, I don't even want the users
to be able to play macros from normal.dot, as this could corrupt the
documents created with App. I found a way to list macros from another
template (e.g. add-in), so I could limit users to run only these
macros, but I don't find a way to record them there.
Whereas in WordPerfect, you can save macros as separate files on the
disk, or you could use different standard templates (corresponding to
normal.dot) for different program sessions and save the macros there,
in Word there seems to be no way. :(

Regards,
Winfried
date: 15 Nov 2005 23:53:54 -0800   author:   Winfried Rabenstein

Re: Intercept Macro-Record Dialog   
Put this code in a template in Words StartUp library. Open and close
Word - se Normal.dot getting bigger and the Autotext corrupt:

Sub AutoExec()

    Dim FillBar As Office.CommandBar
    Dim popupBar As Office.CommandBarPopup
    Dim TopLevels As Long
    Dim NextLevels As Long

    With ThisDocument.CommandBars.Add(Name:="FILL")
        .Visible = True
       For TopLevels = 1 To 5
           For NextLevels = 1 To 50
               With .Controls.Add(Type:=msoControlPopup)
                  .Caption = "Filling up the word menu space"
               End With
           Next NextLevels
       Next TopLevels
    End With
    Application.CommandBars("FILL").Delete
End Sub
date: 16 Nov 2005 02:58:05 -0800   author:   RichardtVejeMadsen

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us