wdDialogEditAutoText

K

Kirsten

Hi, I was hoping someone could help me out. These are the arguments for
wddialogeditautotext: Name, Context, InsertAs, Insert, Add, Define,
InsertAsText, Delete, and CompleteAT

So which argument would I use to set the template to a specific template of
my choosing when calling the command wddialogeditautotext in a vba program?

Thanks for any help?
 
J

Julie

Kirsten,

What version of Word?

As far I know, what you wish to do is not possible in Word 2K and that seems
also to be so in Word XP (either no dialog constant available or dialog
constant is broken ... I cannot recall which of those problems applies).

I encountered this a few years ago when attempting to prevent save of
autotext entries to normal.dot. I work around it by using a custom macro to
save autotext, which points directly to the template to save in,

oTemplate.AutoTextEntries.Add _
Name:=sNewAutoTextName, _
Range:=Selection.Range

Hope this helps.
Julie
 
K

Kirsten

What version of Word?

I'm in 2000.
As far I know, what you wish to do is not possible in Word 2K and that seems
also to be so in Word XP (either no dialog constant available or dialog
constant is broken ... I cannot recall which of those problems applies).

Okay. I just wanted to make sure.
I encountered this a few years ago when attempting to prevent save of
autotext entries to normal.dot.

Exactly! How annoying.

I work around it by using a custom macro to
save autotext, which points directly to the template to save in,
oTemplate.AutoTextEntries.Add _
Name:=sNewAutoTextName, _
Range:=Selection.Range


So you just ditched the dialog box altogether. Cool. I just
gave it a whirl and it worked great. But it didn't prompt me if I wanted to
redefine the entry. I guess that's not really a bad thing. I'm having the
program read
the first sentence (the heading) of the autotext entry and just name it
whatever that heading is. So if the heading already exists, it redefines
it, as it should. Did you run into any problems with that?

Anyways, I think this will work great for what I want. Thanks tons!
 
J

Julie

Kirsten

re problem not prompting to replace entry, before saving the item, your
macro can look for an existing autotext of that name in the target template
and show a custom confirmation prompt before overwriting the item.

Regards,
Jill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top