Advertisement

04.28.2007 at 02:59PM PDT, ID: 22540567
[x]
Attachment Details

Event for document close

Asked by PatternNut in Visual Basic Programming, Microsoft Word

Hi Experts,

I am working on a word add-in in VB6 which is dependent on working with one document that must not change.

In the form_load section it has this code to set the activedocument in a way that cannot be changed:

If Application.Documents.Count > 0 then
    Set docBeingUsed = Application.ActiveDocument
Else
    msgbox "A document must be open.", , "Error"
    'may need to call terminate sub here?
    Exit Sub
End If

But if the user decides to close the document half way through, the add-in is still open and just about anything causes an error.

What's the best way to manage that?  I can do it through error checking, but I'd really prefer an event if it's possible.  Any thoughts on the best way to handle this would be a great help.

Cheers,

PatternNutStart Free Trial
[+][-]04.28.2007 at 06:06PM PDT, ID: 18995853

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.29.2007 at 12:32AM PDT, ID: 18996480

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.29.2007 at 03:22AM PDT, ID: 18996768

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.29.2007 at 03:38AM PDT, ID: 18996784

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Basic Programming, Microsoft Word
Sign Up Now!
Solution Provided By: GrahamSkan
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.29.2007 at 03:52AM PDT, ID: 18996791

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.06.2007 at 03:17AM PDT, ID: 19038570

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.13.2007 at 09:05PM PDT, ID: 19082915

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2007 at 01:03AM PDT, ID: 19083532

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2007 at 04:18PM PDT, ID: 19089252

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.19.2007 at 01:55PM PDT, ID: 19121351

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.11.2007 at 02:26PM PDT, ID: 19677264

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]08.16.2007 at 03:07PM PDT, ID: 19712989

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]08.21.2007 at 03:02PM PDT, ID: 19741997

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32