#1
|
|||
|
|||
table row create folder
hello everyone,
I have a word document that contains a table. The table has several columns and many rows. What I am trying to do is make word creates a folder automatically using the text in a row (spanning over several columns) and I want this to happen automatically (maybe when the user leaves the row ? or perhaps when he/she hits the save button ?). I used vba in access before, but I have never used it in word so I am a bit confused. Help please ... |
#2
|
||||
|
||||
The simplest approach may be to intercept Word's Document_Close event, but you'd need to supply the logic for which rows to process.
Although Word has a 'Selection Change' event that you might be able to leverage, it fires for every selection change, so you'd need to code it so that it only does anything under the appropriate conditions. It also entails the complications of creating a class module and event procedure. For more, see: https://wordmvp.com/FAQs/MacrosVBA/AppClassEvents.htm Your code might look like: Code:
Private Sub oApp_WindowSelectionChange(ByVal Sel As Selection) Application.ScreenUpdating = False With Sel 'Do your processing here End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
create rule to copy sent items to specified folder | shmu | Outlook | 0 | 12-15-2015 04:08 AM |
Mail merge from excel - need to create sheets and create a table | bluenosebex | Mail Merge | 5 | 08-02-2015 05:34 PM |
Folder I didn't create (named after password)? | Peewiglet | Outlook | 0 | 03-27-2014 02:15 PM |
How to create a system folder with VB macro? | Joe Patrick | Word VBA | 4 | 12-17-2011 02:04 PM |
Cannot create a public folder? | gfkbob | Outlook | 0 | 01-07-2010 07:18 AM |