![]() |
#1
|
|||
|
|||
![]()
Hi guys, this is my first visit to this forum so please forgive me if I unknowingly break any site rules. I will try to honor all of these.
I have some knowledge of programming Excel using VBA but very little knowlege of using VBA with Word. I have a difficulty and I am not sure wether to log this as a Word Issue, Excel Issue or a Windows Issue, I am hoping somebody can provide me with some guidance. I have an excel macro, which during its execution, opens a blank word template document and transfers data to this word document. I then want this document to be stored in a folder with other documents created in the same way. Each new document should have a unique file name which starts with a serial number. All of this is catered for and operates correctly. Where I have a difficulty is that it is possible for human error to come into effect and open a document for a file which already exists. So I have a word document BeforeSave event triggered which checks to see if the file already exists and warns the user if this is the case. The beforesave event is stored in a class and also works fine when I am dealing directly with Word. i.e if I open the word document as a word document and not via Excel.It always triggers and testing advises the user if they would overwrite an already existing file.Here comes the rub. If I get the Excel Macro to open the word document and use the word Save icon the beforesave event does not trigger. Even if I close Excel leaving only the word document Open, the Word BeforeSave event still does not trigger. Could anybody please provide me with any ideas to why this may be happening and how to tackle it. As I stated it works fine when I open Word on its own. Many Thanks Megazoid. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Workbook_Open event do not working? | beginner | Excel Programming | 8 | 04-11-2013 02:37 PM |
Duplicate event reminders | rgarneau | Outlook | 0 | 01-23-2012 08:58 AM |
![]() |
groegee | Outlook | 1 | 12-05-2011 09:56 PM |
Catch event before next slide | PetLahev | PowerPoint | 0 | 10-21-2011 03:29 AM |
![]() |
PosseJohn | Word VBA | 2 | 07-17-2011 01:39 AM |