Hi Jeff
>> How do I access the methods in the addin?
There are three steps:
1. Open the add-in using File > New. In the VBE, in the project explorer,
right-click the name of the project (eg 'Template Project') and give it a
name. Save and close.
2. In your template, in the VBE, Tools > References. Set a reference to your
add-in.
3. In your template's code, use MyAddIn.MySubName
>> How do I make sure that the dot fires AFTER the addin's auto_exec?
I understand that prayer helps. Sprinkling DoEvents liberally in all code
helps a bit more. See the thread here for typical issues:
http://groups.google.com.au/group/microsoft.public.word.vba.general/browse_frm/t
hread/76c5724597d08ea2/3ece763790c6f330
Hope this helps.
Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
> If I have one addin and I want to have add specific ADO SQL query to just
> ONE template dot, when this one dot is launched (via automated process, no
[quoted text clipped - 17 lines]
>
> JeffP...
JeffP@Work - 13 Oct 2006 18:50 GMT
Shauna,
Re-reading the last cell re Addin
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/de
ovrworddocumenttemplatesvswordaddinsglobaltemplates.asp
I found setting a "Ref" and now I have the methods available to me.
I've added to my template....
In "ThisDoc..."
Option Expl....
----------------------------
Public Sub AutoOpen()
MyLocalModule.MySub
End Sub
----------------------------
Which MySub is a wrapper for anything that will happen in this template.
I also found DocProperty so I can assign my returned values from my SQL
query to merge fields w/in the doc.
It's not fully tested but it appears to be working.
My templates are printed by a "Print" cmd, w/no user interaction similar to
using a right-click |Print and pray that my fields are updated, SalesPeople
hate when their commision coding is done wrong.
TIA
JeffP....
> Hi Jeff
>
[quoted text clipped - 42 lines]
>>
>> JeffP...