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: Thu, 15 Dec 2005 14:48:02 -0800,    group: microsoft.public.word.vba.addins        back       


How Templates Are Attached to Documents   
I created a template with toolbars and macros.  I then opened a new document 
from the template and saved it as a Word Document.  I don't understand how it 
stays attached to other people that look at it.  When I open the file, I see 
the toolbar and can use the macros.  When other people take it from the 
network, the toolbar is gone and they can't see the macros.

Is it because the template is on my harddrive?  Do I have to save it some 
other way?

Thanks in advance.
-- 
Debra Ann
date: Thu, 15 Dec 2005 14:48:02 -0800   author:   Debra Ann

Re: How Templates Are Attached to Documents   
Your macros and toolbars are in the template. It is on your hard drive. It 
makes sense that people using different computers can't use the parts that 
are on your computer. You may want to distribute your template as a document 
template or as a global template, depending on whether the toolbars and 
macros are useful only in documents created from your template or are useful 
in other documents as well. See 
http://addbalance.com/word/movetotemplate.htm for step-by-step instructions 
on moving / sharing / copying / backing-up customizations including 
AutoText, AutoCorrect, keyboard assignments, toolbars, macros, etc. Also 
take a look at http://word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm.
-- 

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.

"Debra Ann"  wrote in message 
news:56765557-1A67-4A28-B49D-522E213477A4@microsoft.com...
>I created a template with toolbars and macros.  I then opened a new 
>document
> from the template and saved it as a Word Document.  I don't understand how 
> it
> stays attached to other people that look at it.  When I open the file, I 
> see
> the toolbar and can use the macros.  When other people take it from the
> network, the toolbar is gone and they can't see the macros.
>
> Is it because the template is on my harddrive?  Do I have to save it some
> other way?
>
> Thanks in advance.
> -- 
> Debra Ann
date: Thu, 15 Dec 2005 23:02:47 -0600   author:   Charles Kenyon

Re: How Templates Are Attached to Documents   
If you put a copy of the template in  the same network folder as the
document, other people should be able to see it.

--
Enjoy,
Tony


"Debra Ann"  wrote in message
news:56765557-1A67-4A28-B49D-522E213477A4@microsoft.com...
> I created a template with toolbars and macros.  I then opened a new
document
> from the template and saved it as a Word Document.  I don't understand how
it
> stays attached to other people that look at it.  When I open the file, I
see
> the toolbar and can use the macros.  When other people take it from the
> network, the toolbar is gone and they can't see the macros.
>
> Is it because the template is on my harddrive?  Do I have to save it some
> other way?
>
> Thanks in advance.
> --
> Debra Ann
date: Fri, 16 Dec 2005 20:46:29 -0000   author:   Tony Jollans My Forename at My Surname dot com

Re: How Templates Are Attached to Documents   
Thanks for the info.  Your website page helped me to understand that Word 
Documents can also contain toolbars and macros.  So I went to the organizer 
and copied my toolbars and my macros to an actual Word Document and I see the 
toolbar and the macros.  There is just one problem and I'm not sure how to 
solve it:

I have the following code which updates a dropdown list with the 
cross-reference list for tables.  It initializes every time from template 
document (.dot), but it does not always initalize in the Word Document (.doc) 
containing the macros.  I could see if it never did or also did, but 
sometimes it works and sometimes it doesn't.

VERY CONFUSED!!!


Private Sub UserForm_Initialize()
    Dim varXRefs As Variant
    Dim Index As Integer

    ' Clear out any previous contents

    Me.cboTableNumber.Clear

    ' Load just the endnotes into varXRefs

    varXRefs = ActiveDocument.GetCrossReferenceItems _
    (ReferenceType:="Table")

    ' Load the ListBox from varXRefs as an array

    For Index = 1 To UBound(varXRefs)
        Me.cboTableNumber.AddItem varXRefs(Index)
    Next Index

    ' Test whether the list has any entries and
    ' set command buttons accordingly

    If Me.cboTableNumber.ListCount > 0 Then
        Me.cboTableNumber.ListIndex = 0
        Me.cmdInsert.Enabled = True
    Else
        ReferenceTable.Hide
        MsgBox ("There are no tables to cross-reference.")
    End If

End Sub




-- 
Debra Ann


"Charles Kenyon" wrote:

> Your macros and toolbars are in the template. It is on your hard drive. It 
> makes sense that people using different computers can't use the parts that 
> are on your computer. You may want to distribute your template as a document 
> template or as a global template, depending on whether the toolbars and 
> macros are useful only in documents created from your template or are useful 
> in other documents as well. See 
> http://addbalance.com/word/movetotemplate.htm for step-by-step instructions 
> on moving / sharing / copying / backing-up customizations including 
> AutoText, AutoCorrect, keyboard assignments, toolbars, macros, etc. Also 
> take a look at http://word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm.
> -- 
> 
> 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.
> 
> "Debra Ann"  wrote in message 
> news:56765557-1A67-4A28-B49D-522E213477A4@microsoft.com...
> >I created a template with toolbars and macros.  I then opened a new 
> >document
> > from the template and saved it as a Word Document.  I don't understand how 
> > it
> > stays attached to other people that look at it.  When I open the file, I 
> > see
> > the toolbar and can use the macros.  When other people take it from the
> > network, the toolbar is gone and they can't see the macros.
> >
> > Is it because the template is on my harddrive?  Do I have to save it some
> > other way?
> >
> > Thanks in advance.
> > -- 
> > Debra Ann 
> 
> 
>
date: Sun, 18 Dec 2005 17:58:02 -0800   author:   Debra Ann

Re: How Templates Are Attached to Documents   
Your code doesn't do anything until its userform is started. Do you have 
separate code to display the userform? If it is in an AutoNew macro in your 
template, it would need to be in an AutoOpen macro in your documents.

Putting code in documents is seldom necessary and never a good idea. Why is 
it that you can't distribute the template?
-- 
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.

"Debra Ann"  wrote in message 
news:8824A430-1203-4768-B341-D501A51CAB87@microsoft.com...
> Thanks for the info.  Your website page helped me to understand that Word
> Documents can also contain toolbars and macros.  So I went to the 
> organizer
> and copied my toolbars and my macros to an actual Word Document and I see 
> the
> toolbar and the macros.  There is just one problem and I'm not sure how to
> solve it:
>
> I have the following code which updates a dropdown list with the
> cross-reference list for tables.  It initializes every time from template
> document (.dot), but it does not always initalize in the Word Document 
> (.doc)
> containing the macros.  I could see if it never did or also did, but
> sometimes it works and sometimes it doesn't.
>
> VERY CONFUSED!!!
>
>
> Private Sub UserForm_Initialize()
>    Dim varXRefs As Variant
>    Dim Index As Integer
>
>    ' Clear out any previous contents
>
>    Me.cboTableNumber.Clear
>
>    ' Load just the endnotes into varXRefs
>
>    varXRefs = ActiveDocument.GetCrossReferenceItems _
>    (ReferenceType:="Table")
>
>    ' Load the ListBox from varXRefs as an array
>
>    For Index = 1 To UBound(varXRefs)
>        Me.cboTableNumber.AddItem varXRefs(Index)
>    Next Index
>
>    ' Test whether the list has any entries and
>    ' set command buttons accordingly
>
>    If Me.cboTableNumber.ListCount > 0 Then
>        Me.cboTableNumber.ListIndex = 0
>        Me.cmdInsert.Enabled = True
>    Else
>        ReferenceTable.Hide
>        MsgBox ("There are no tables to cross-reference.")
>    End If
>
> End Sub
>
>
>
>
> -- 
> Debra Ann
>
>
> "Charles Kenyon" wrote:
>
>> Your macros and toolbars are in the template. It is on your hard drive. 
>> It
>> makes sense that people using different computers can't use the parts 
>> that
>> are on your computer. You may want to distribute your template as a 
>> document
>> template or as a global template, depending on whether the toolbars and
>> macros are useful only in documents created from your template or are 
>> useful
>> in other documents as well. See
>> http://addbalance.com/word/movetotemplate.htm for step-by-step 
>> instructions
>> on moving / sharing / copying / backing-up customizations including
>> AutoText, AutoCorrect, keyboard assignments, toolbars, macros, etc. Also
>> take a look at http://word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm.
>> -- 
>>
>> 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.
>>
>> "Debra Ann"  wrote in message
>> news:56765557-1A67-4A28-B49D-522E213477A4@microsoft.com...
>> >I created a template with toolbars and macros.  I then opened a new
>> >document
>> > from the template and saved it as a Word Document.  I don't understand 
>> > how
>> > it
>> > stays attached to other people that look at it.  When I open the file, 
>> > I
>> > see
>> > the toolbar and can use the macros.  When other people take it from the
>> > network, the toolbar is gone and they can't see the macros.
>> >
>> > Is it because the template is on my harddrive?  Do I have to save it 
>> > some
>> > other way?
>> >
>> > Thanks in advance.
>> > -- 
>> > Debra Ann
>>
>>
>>
date: Sun, 18 Dec 2005 22:36:55 -0600   author:   Charles Kenyon

Re: How Templates Are Attached to Documents   
Sorry for not being more detailed.  I have a toolbar button that calls a 
macro.  The macro shows the popup (ReferendeTable.Show).  The code below is 
the initialize part of the popup form.  I also have code on an Insert command 
button that, once they select the reference in the table dropdown list, will 
insert the reference in the document.

I would love to distribute as a template.  Unfortunately, they are using a 
records management software called Documentum. In this software, the user 
chooses which report they want, it assigns the number for the report, checks 
it out of Documentum and puts it in a "Documentum Checkout" folder on their 
harddrive for them to use.  The version of Documentum we have has a bug in it 
and cannot do templates.  Therefore only Word Documents can be distributed 
until they get the new version which won't be for another 3-4 months.

I can send you the Word Document and the Template Document version.  You 
will see the the Template Document works fine and the Word Document does not 
(with the same code).

Thanks for any help you can offer.


-- 
Debra Ann


"Charles Kenyon" wrote:

> Your code doesn't do anything until its userform is started. Do you have 
> separate code to display the userform? If it is in an AutoNew macro in your 
> template, it would need to be in an AutoOpen macro in your documents.
> 
> Putting code in documents is seldom necessary and never a good idea. Why is 
> it that you can't distribute the template?
> -- 
> 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.
> 
> "Debra Ann"  wrote in message 
> news:8824A430-1203-4768-B341-D501A51CAB87@microsoft.com...
> > Thanks for the info.  Your website page helped me to understand that Word
> > Documents can also contain toolbars and macros.  So I went to the 
> > organizer
> > and copied my toolbars and my macros to an actual Word Document and I see 
> > the
> > toolbar and the macros.  There is just one problem and I'm not sure how to
> > solve it:
> >
> > I have the following code which updates a dropdown list with the
> > cross-reference list for tables.  It initializes every time from template
> > document (.dot), but it does not always initalize in the Word Document 
> > (.doc)
> > containing the macros.  I could see if it never did or also did, but
> > sometimes it works and sometimes it doesn't.
> >
> > VERY CONFUSED!!!
> >
> >
> > Private Sub UserForm_Initialize()
> >    Dim varXRefs As Variant
> >    Dim Index As Integer
> >
> >    ' Clear out any previous contents
> >
> >    Me.cboTableNumber.Clear
> >
> >    ' Load just the endnotes into varXRefs
> >
> >    varXRefs = ActiveDocument.GetCrossReferenceItems _
> >    (ReferenceType:="Table")
> >
> >    ' Load the ListBox from varXRefs as an array
> >
> >    For Index = 1 To UBound(varXRefs)
> >        Me.cboTableNumber.AddItem varXRefs(Index)
> >    Next Index
> >
> >    ' Test whether the list has any entries and
> >    ' set command buttons accordingly
> >
> >    If Me.cboTableNumber.ListCount > 0 Then
> >        Me.cboTableNumber.ListIndex = 0
> >        Me.cmdInsert.Enabled = True
> >    Else
> >        ReferenceTable.Hide
> >        MsgBox ("There are no tables to cross-reference.")
> >    End If
> >
> > End Sub
> >
> >
> >
> >
> > -- 
> > Debra Ann
> >
> >
> > "Charles Kenyon" wrote:
> >
> >> Your macros and toolbars are in the template. It is on your hard drive. 
> >> It
> >> makes sense that people using different computers can't use the parts 
> >> that
> >> are on your computer. You may want to distribute your template as a 
> >> document
> >> template or as a global template, depending on whether the toolbars and
> >> macros are useful only in documents created from your template or are 
> >> useful
> >> in other documents as well. See
> >> http://addbalance.com/word/movetotemplate.htm for step-by-step 
> >> instructions
> >> on moving / sharing / copying / backing-up customizations including
> >> AutoText, AutoCorrect, keyboard assignments, toolbars, macros, etc. Also
> >> take a look at http://word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm.
> >> -- 
> >>
> >> 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.
> >>
> >> "Debra Ann"  wrote in message
> >> news:56765557-1A67-4A28-B49D-522E213477A4@microsoft.com...
> >> >I created a template with toolbars and macros.  I then opened a new
> >> >document
> >> > from the template and saved it as a Word Document.  I don't understand 
> >> > how
> >> > it
> >> > stays attached to other people that look at it.  When I open the file, 
> >> > I
> >> > see
> >> > the toolbar and can use the macros.  When other people take it from the
> >> > network, the toolbar is gone and they can't see the macros.
> >> >
> >> > Is it because the template is on my harddrive?  Do I have to save it 
> >> > some
> >> > other way?
> >> >
> >> > Thanks in advance.
> >> > -- 
> >> > Debra Ann
> >>
> >>
> >> 
> 
> 
>
date: Mon, 19 Dec 2005 06:19:04 -0800   author:   Debra Ann

Re: How Templates Are Attached to Documents   
Do you get error messages? Nothing happens?

The popup you are describing is what is called a UserForm. You would need 
the form itself in your document as well as the code modules. You can see 
this in the vba Explorer. Alt-F11

Your toolbar button may be looking for code in your template, not in the 
document, even if the code is in the document. You may need to recreate the 
toolbar button in the document.
-- 
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.

-- 
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.

"Debra Ann"  wrote in message 
news:2A66D343-6D0C-4F63-B3BF-723B2F098360@microsoft.com...
> Sorry for not being more detailed.  I have a toolbar button that calls a
> macro.  The macro shows the popup (ReferendeTable.Show).  The code below 
> is
> the initialize part of the popup form.  I also have code on an Insert 
> command
> button that, once they select the reference in the table dropdown list, 
> will
> insert the reference in the document.
>
> I would love to distribute as a template.  Unfortunately, they are using a
> records management software called Documentum. In this software, the user
> chooses which report they want, it assigns the number for the report, 
> checks
> it out of Documentum and puts it in a "Documentum Checkout" folder on 
> their
> harddrive for them to use.  The version of Documentum we have has a bug in 
> it
> and cannot do templates.  Therefore only Word Documents can be distributed
> until they get the new version which won't be for another 3-4 months.
>
> I can send you the Word Document and the Template Document version.  You
> will see the the Template Document works fine and the Word Document does 
> not
> (with the same code).
>
> Thanks for any help you can offer.
>
>
> -- 
> Debra Ann
>
>
> "Charles Kenyon" wrote:
>
>> Your code doesn't do anything until its userform is started. Do you have
>> separate code to display the userform? If it is in an AutoNew macro in 
>> your
>> template, it would need to be in an AutoOpen macro in your documents.
>>
>> Putting code in documents is seldom necessary and never a good idea. Why 
>> is
>> it that you can't distribute the template?
>> -- 
>> 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.
>>
>> "Debra Ann"  wrote in message
>> news:8824A430-1203-4768-B341-D501A51CAB87@microsoft.com...
>> > Thanks for the info.  Your website page helped me to understand that 
>> > Word
>> > Documents can also contain toolbars and macros.  So I went to the
>> > organizer
>> > and copied my toolbars and my macros to an actual Word Document and I 
>> > see
>> > the
>> > toolbar and the macros.  There is just one problem and I'm not sure how 
>> > to
>> > solve it:
>> >
>> > I have the following code which updates a dropdown list with the
>> > cross-reference list for tables.  It initializes every time from 
>> > template
>> > document (.dot), but it does not always initalize in the Word Document
>> > (.doc)
>> > containing the macros.  I could see if it never did or also did, but
>> > sometimes it works and sometimes it doesn't.
>> >
>> > VERY CONFUSED!!!
>> >
>> >
>> > Private Sub UserForm_Initialize()
>> >    Dim varXRefs As Variant
>> >    Dim Index As Integer
>> >
>> >    ' Clear out any previous contents
>> >
>> >    Me.cboTableNumber.Clear
>> >
>> >    ' Load just the endnotes into varXRefs
>> >
>> >    varXRefs = ActiveDocument.GetCrossReferenceItems _
>> >    (ReferenceType:="Table")
>> >
>> >    ' Load the ListBox from varXRefs as an array
>> >
>> >    For Index = 1 To UBound(varXRefs)
>> >        Me.cboTableNumber.AddItem varXRefs(Index)
>> >    Next Index
>> >
>> >    ' Test whether the list has any entries and
>> >    ' set command buttons accordingly
>> >
>> >    If Me.cboTableNumber.ListCount > 0 Then
>> >        Me.cboTableNumber.ListIndex = 0
>> >        Me.cmdInsert.Enabled = True
>> >    Else
>> >        ReferenceTable.Hide
>> >        MsgBox ("There are no tables to cross-reference.")
>> >    End If
>> >
>> > End Sub
>> >
>> >
>> >
>> >
>> > -- 
>> > Debra Ann
>> >
>> >
>> > "Charles Kenyon" wrote:
>> >
>> >> Your macros and toolbars are in the template. It is on your hard 
>> >> drive.
>> >> It
>> >> makes sense that people using different computers can't use the parts
>> >> that
>> >> are on your computer. You may want to distribute your template as a
>> >> document
>> >> template or as a global template, depending on whether the toolbars 
>> >> and
>> >> macros are useful only in documents created from your template or are
>> >> useful
>> >> in other documents as well. See
>> >> http://addbalance.com/word/movetotemplate.htm for step-by-step
>> >> instructions
>> >> on moving / sharing / copying / backing-up customizations including
>> >> AutoText, AutoCorrect, keyboard assignments, toolbars, macros, etc. 
>> >> Also
>> >> take a look at 
>> >> http://word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm.
>> >> -- 
>> >>
>> >> 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.
>> >>
>> >> "Debra Ann"  wrote in message
>> >> news:56765557-1A67-4A28-B49D-522E213477A4@microsoft.com...
>> >> >I created a template with toolbars and macros.  I then opened a new
>> >> >document
>> >> > from the template and saved it as a Word Document.  I don't 
>> >> > understand
>> >> > how
>> >> > it
>> >> > stays attached to other people that look at it.  When I open the 
>> >> > file,
>> >> > I
>> >> > see
>> >> > the toolbar and can use the macros.  When other people take it from 
>> >> > the
>> >> > network, the toolbar is gone and they can't see the macros.
>> >> >
>> >> > Is it because the template is on my harddrive?  Do I have to save it
>> >> > some
>> >> > other way?
>> >> >
>> >> > Thanks in advance.
>> >> > -- 
>> >> > Debra Ann
>> >>
>> >>
>> >>
>>
>>
>>
date: Mon, 19 Dec 2005 11:52:13 -0600   author:   Charles Kenyon

Re: How Templates Are Attached to Documents   
Sorry, I got sidetracked with other projects at work for the last couple of 
days.

Yes the UserForm is also in the document.  When the toolbar button is 
pushed, it always opens, but the dropdown button does not always regenerate 
the information.  

The toolbar button only calls a macro, that in turn calls the UserForm to 
Show.  When the UserForm shows, the initial code should regenerate the 
reference list and it does not always do that.  

The weird thing is that we finally had to put the Microsoft Word document 
out on the Network for people to take.  Once we did that, the code started 
updating.  I did try this document on my company system, my home system, and 
another employee's system and every time the code would not regenerate, but 
for some reason it is working once it is pulled from the network.  We are, as 
I said before, confused.
-- 
Debra Ann


"Charles Kenyon" wrote:

> Do you get error messages? Nothing happens?
> 
> The popup you are describing is what is called a UserForm. You would need 
> the form itself in your document as well as the code modules. You can see 
> this in the vba Explorer. Alt-F11
> 
> Your toolbar button may be looking for code in your template, not in the 
> document, even if the code is in the document. You may need to recreate the 
> toolbar button in the document.
> -- 
> 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.
> 
> -- 
> 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.
> 
> "Debra Ann"  wrote in message 
> news:2A66D343-6D0C-4F63-B3BF-723B2F098360@microsoft.com...
> > Sorry for not being more detailed.  I have a toolbar button that calls a
> > macro.  The macro shows the popup (ReferendeTable.Show).  The code below 
> > is
> > the initialize part of the popup form.  I also have code on an Insert 
> > command
> > button that, once they select the reference in the table dropdown list, 
> > will
> > insert the reference in the document.
> >
> > I would love to distribute as a template.  Unfortunately, they are using a
> > records management software called Documentum. In this software, the user
> > chooses which report they want, it assigns the number for the report, 
> > checks
> > it out of Documentum and puts it in a "Documentum Checkout" folder on 
> > their
> > harddrive for them to use.  The version of Documentum we have has a bug in 
> > it
> > and cannot do templates.  Therefore only Word Documents can be distributed
> > until they get the new version which won't be for another 3-4 months.
> >
> > I can send you the Word Document and the Template Document version.  You
> > will see the the Template Document works fine and the Word Document does 
> > not
> > (with the same code).
> >
> > Thanks for any help you can offer.
> >
> >
> > -- 
> > Debra Ann
> >
> >
> > "Charles Kenyon" wrote:
> >
> >> Your code doesn't do anything until its userform is started. Do you have
> >> separate code to display the userform? If it is in an AutoNew macro in 
> >> your
> >> template, it would need to be in an AutoOpen macro in your documents.
> >>
> >> Putting code in documents is seldom necessary and never a good idea. Why 
> >> is
> >> it that you can't distribute the template?
> >> -- 
> >> 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.
> >>
> >> "Debra Ann"  wrote in message
> >> news:8824A430-1203-4768-B341-D501A51CAB87@microsoft.com...
> >> > Thanks for the info.  Your website page helped me to understand that 
> >> > Word
> >> > Documents can also contain toolbars and macros.  So I went to the
> >> > organizer
> >> > and copied my toolbars and my macros to an actual Word Document and I 
> >> > see
> >> > the
> >> > toolbar and the macros.  There is just one problem and I'm not sure how 
> >> > to
> >> > solve it:
> >> >
> >> > I have the following code which updates a dropdown list with the
> >> > cross-reference list for tables.  It initializes every time from 
> >> > template
> >> > document (.dot), but it does not always initalize in the Word Document
> >> > (.doc)
> >> > containing the macros.  I could see if it never did or also did, but
> >> > sometimes it works and sometimes it doesn't.
> >> >
> >> > VERY CONFUSED!!!
> >> >
> >> >
> >> > Private Sub UserForm_Initialize()
> >> >    Dim varXRefs As Variant
> >> >    Dim Index As Integer
> >> >
> >> >    ' Clear out any previous contents
> >> >
> >> >    Me.cboTableNumber.Clear
> >> >
> >> >    ' Load just the endnotes into varXRefs
> >> >
> >> >    varXRefs = ActiveDocument.GetCrossReferenceItems _
> >> >    (ReferenceType:="Table")
> >> >
> >> >    ' Load the ListBox from varXRefs as an array
> >> >
> >> >    For Index = 1 To UBound(varXRefs)
> >> >        Me.cboTableNumber.AddItem varXRefs(Index)
> >> >    Next Index
> >> >
> >> >    ' Test whether the list has any entries and
> >> >    ' set command buttons accordingly
> >> >
> >> >    If Me.cboTableNumber.ListCount > 0 Then
> >> >        Me.cboTableNumber.ListIndex = 0
> >> >        Me.cmdInsert.Enabled = True
> >> >    Else
> >> >        ReferenceTable.Hide
> >> >        MsgBox ("There are no tables to cross-reference.")
> >> >    End If
> >> >
> >> > End Sub
> >> >
> >> >
> >> >
> >> >
> >> > -- 
> >> > Debra Ann
> >> >
> >> >
> >> > "Charles Kenyon" wrote:
> >> >
> >> >> Your macros and toolbars are in the template. It is on your hard 
> >> >> drive.
> >> >> It
> >> >> makes sense that people using different computers can't use the parts
> >> >> that
> >> >> are on your computer. You may want to distribute your template as a
> >> >> document
> >> >> template or as a global template, depending on whether the toolbars 
> >> >> and
> >> >> macros are useful only in documents created from your template or are
> >> >> useful
> >> >> in other documents as well. See
> >> >> http://addbalance.com/word/movetotemplate.htm for step-by-step
> >> >> instructions
> >> >> on moving / sharing / copying / backing-up customizations including
> >> >> AutoText, AutoCorrect, keyboard assignments, toolbars, macros, etc. 
> >> >> Also
> >> >> take a look at 
> >> >> http://word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm.
> >> >> -- 
> >> >>
> >> >> 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.
> >> >>
> >> >> "Debra Ann"  wrote in message
> >> >> news:56765557-1A67-4A28-B49D-522E213477A4@microsoft.com...
> >> >> >I created a template with toolbars and macros.  I then opened a new
> >> >> >document
> >> >> > from the template and saved it as a Word Document.  I don't 
> >> >> > understand
> >> >> > how
> >> >> > it
> >> >> > stays attached to other people that look at it.  When I open the 
> >> >> > file,
> >> >> > I
> >> >> > see
> >> >> > the toolbar and can use the macros.  When other people take it from 
> >> >> > the
> >> >> > network, the toolbar is gone and they can't see the macros.
> >> >> >
> >> >> > Is it because the template is on my harddrive?  Do I have to save it
> >> >> > some
> >> >> > other way?
> >> >> >
> >> >> > Thanks in advance.
> >> >> > -- 
> >> >> > Debra Ann
> >> >>
> >> >>
> >> >>
> >>
> >>
> >> 
> 
> 
>
date: Thu, 22 Dec 2005 11:04:02 -0800   author:   Debra Ann

Google
 
Web ureader.com


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