Why doesn't this work? 
Author Message
 Why doesn't this work?

I've  placed the application.goback in the document_open event, but
nothing seems to fire on that event. I put a msgbox function in just
to see if anything is happening, but that does not work either.

Private Sub Document_Open()
Application.GoBack
MsgBox "Testing"
End Sub

Thanks



Mon, 24 Mar 2003 03:00:00 GMT  
 Why doesn't this work?

Hi Tom

Where exactly (which module, in which file) have you put this code?

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
Word FAQs at http://www.multilinker.com/wordfaq
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email


Quote:
> I've  placed the application.goback in the document_open event, but
> nothing seems to fire on that event. I put a msgbox function in just
> to see if anything is happening, but that does not work either.

> Private Sub Document_Open()
> Application.GoBack
> MsgBox "Testing"
> End Sub

> Thanks



Mon, 24 Mar 2003 03:00:00 GMT  
 Why doesn't this work?

Hi Tom,
Don't know if this applies to you or not, but if you are calling/opening
this document from another one and using the run automacro method, then
you need to have an AutoOpen Subroutine placed inside a module in your
target document, even if there is no code in it, otherwise the
Document_Open procedure wont trigger.
Hope this helps.
Rick D

Quote:

> I've  placed the application.goback in the document_open event, but
> nothing seems to fire on that event. I put a msgbox function in just
> to see if anything is happening, but that does not work either.

> Private Sub Document_Open()
> Application.GoBack
> MsgBox "Testing"
> End Sub

> Thanks



Mon, 24 Mar 2003 03:00:00 GMT  
 Why doesn't this work?
Thanks for your replies. I guess I'm used to programming in VB, and MS
Access, and expect the event to fire when the document opens, like
when a form opens in Access.

I placed the Application.GoBack in a module under Normal\ThisDocument,
in the Document_Open sub. I expected this event to run when the
document opened. I still don't understand why it wouldn't, tho I did
get it to work by creating an autoopen macro.

Why doesn't the Document_Open sub not run, when the document is
opened?

Thanks
On Thu, 5 Oct 2000 13:37:11 +0100, "Jonathan West"

Quote:

>Hi Tom

>Where exactly (which module, in which file) have you put this code?



Tue, 25 Mar 2003 12:15:10 GMT  
 Why doesn't this work?
Rick,

Thanks for your reply. I just put the procedure in the Document_Open
event for the normal.dot, expecting the behavior to carry over to all
docs created based on that template. I wasn't using any autoopen
macro.

Tom


Quote:

>Hi Tom,
>Don't know if this applies to you or not, but if you are calling/opening
>this document from another one and using the run automacro method, then
>you need to have an AutoOpen Subroutine placed inside a module in your
>target document, even if there is no code in it, otherwise the
>Document_Open procedure wont trigger.
>Hope this helps.
>Rick D


>> I've  placed the application.goback in the document_open event, but
>> nothing seems to fire on that event. I put a msgbox function in just
>> to see if anything is happening, but that does not work either.

>> Private Sub Document_Open()
>> Application.GoBack
>> MsgBox "Testing"
>> End Sub

>> Thanks



Tue, 25 Mar 2003 12:20:26 GMT  
 Why doesn't this work?
Now it's working, I have no idea why it didn't work before.....


Quote:

>Hi Tom,
>Don't know if this applies to you or not, but if you are calling/opening
>this document from another one and using the run automacro method, then
>you need to have an AutoOpen Subroutine placed inside a module in your
>target document, even if there is no code in it, otherwise the
>Document_Open procedure wont trigger.
>Hope this helps.
>Rick D


>> I've  placed the application.goback in the document_open event, but
>> nothing seems to fire on that event. I put a msgbox function in just
>> to see if anything is happening, but that does not work either.

>> Private Sub Document_Open()
>> Application.GoBack
>> MsgBox "Testing"
>> End Sub

>> Thanks



Tue, 25 Mar 2003 12:22:47 GMT  
 Why doesn't this work?
Hi Tom,

If you put the code into normal.dot, it should work for documents based on
normal.dot, but not for documents based on other templates. AutoOpen placed
in normal.dot will run when any document is opened.

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
Word FAQs at http://www.multilinker.com/wordfaq
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email


Quote:
> Thanks for your replies. I guess I'm used to programming in VB, and MS
> Access, and expect the event to fire when the document opens, like
> when a form opens in Access.

> I placed the Application.GoBack in a module under Normal\ThisDocument,
> in the Document_Open sub. I expected this event to run when the
> document opened. I still don't understand why it wouldn't, tho I did
> get it to work by creating an autoopen macro.

> Why doesn't the Document_Open sub not run, when the document is
> opened?

> Thanks
> On Thu, 5 Oct 2000 13:37:11 +0100, "Jonathan West"

> >Hi Tom

> >Where exactly (which module, in which file) have you put this code?



Tue, 25 Mar 2003 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Why oh why doesn't this work?

2. Why doesn't this work?

3. Why doesn't this work???

4. Why doesn't this work?!!

5. Why doesn't this work?

6. why doesn't it work?????

7. Why doesn't this work anymore?

8. threading and why doesn't it work!!!! :)

9. Itemop.Navigate - Why doesn't it work?!

10. Why doesn't this work

11. Why doesn't it work?

12. Help needed !! Why doesn't this work

 

 
Powered by phpBB® Forum Software