Custom Save and Close procedures

X

XmlAdoNewbie

Hi All,
I have created a word document "editor". In my first template i have a
form that opens and shows the description of about 99 word documents
in a single folder, the user has the option of picking one of these
documents and opening it in another template to edit. The second
template opens with only a custom toolbar showing, this toolbar has a
"save" button and an "exit" button on it.

I am having a few problems with my custom Save and Exit commands.

The code i have to save the document does not work.. the code is as
follows

ActiveDocument.SaveAs FileName:=docletPath &
ActiveDocument.ActiveWindow.Caption '' activewindow.caption is the
filename doclet path is the path to where the document is stored

is there something i have to do when i open the doclet to say that
it's editable.. could that be the problem?

# 2 -- the exit button works in that it closes the document however
the text that was opened into the template saves onto the template
when i exit and i don't want it to do this, i would also like that
instance of word to close as well, the instance of word that was
opened with the template remains open even though the attached
template is closed. the code i have for this is as follows.

ThisDocument.Close

any help would be appreciated.
Thanks in advance,
Erin
 
W

Word Heretic

G'day (e-mail address removed) (XmlAdoNewbie),

ActiveDocument.Name gives you the name of the doc


As for the exit button, it depends on how you are opening the modified
template. Code samples help reduce the amount of psychic power I need
to expend.


Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


XmlAdoNewbie reckoned:
 

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