View Full Version : how to intercept open event when open word by double click file
ttminh
02-02-2006, 08:20 PM
Hello,
Could any1 point me out how to write a VBA code to intercept open file event when i open word by double click file in explorer?
and also how to intercept file close event when i close word by click to top right x button.
Thank you very much
Minh
Jacob Hilderbrand
02-02-2006, 08:51 PM
Put this code in the ThisDocument module.
Option Explicit
Private Sub Document_Open()
'Code Here
End Sub
Private Sub Document_Close()
'Code Here
End Sub
fumei
02-05-2006, 10:29 AM
But put it in the Document_Open event of normal.dot...not the file that may be opened.
:hi:
ttminh
02-05-2006, 06:06 PM
Thank you guys,
but AFAK and as i already coded document_open, the sub only run right after the file be opened.
I just want the sub run before file be opened just like sub FileOpen to intercept file open event.
but when open by double click file, the sub FileOpen be passed.
any comment
Minh,
fumei
02-05-2006, 10:28 PM
Where are you getting and using Sub FileOpen?
ttminh
02-06-2006, 08:52 PM
Normal - Modules
the sub FileOpen to override word inner sub FileOpen
Main thing that i just want to force the File Conversion when open some encoded files
ttminh
02-06-2006, 09:05 PM
or you can paste this text to notepad, save as textfile with any name you want and open it by Word , the File Conversion will popup and you have to choose plain text to open it properly.
Xin gi?i thi?u v?i c?c ??ng ch? m?t s? ?i?u c? b?n nh* sau:
Xin gi?i thi?u v?i c?c ??ng c Xin gi?i thi?u v?i c?c ??ng ch? m?t s? ?i?u c? b?n nh* sau: h? m?t s? ?i?u c? b?n nh* sau: Xin gi?i thi?u v?i c?c ??ng ch? m?t s? ?i?u c? b?n nh* sau: Xin gi?i thi?u v?i c?c ??ng ch? m?t s? ?i?u c? b?n nh* sau: Xin gi?i thi?u v?i c?c ??ng ch? m?t s? ?i?u c? b?n nh* sau: Xin gi?i thi?u v?i c?c ??ng ch? m?t s? ?i?u c? b?n nh* sau: Xin gi?i thi?u v?i c?c ??ng ch? m?t s? ?i?u c? b?n nh* sau: Xin gi?i thi?u v?i c?c ??ng ch? m?t s? ?i?u c? b?n nh* sau: Xin gi?i thi?u v?i c?c ??ng ch? m?t s? ?i?u c? b?n nh* sau: Xin gi?i thi?u v?i c?c ??ng ch? m?t s? ?i?u c? b?n nh* sau: Xin gi?i thi?u v?i c?c ??ng ch? m?t s? ?i?u c? b?n nh* sau:
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.