![]() |
|
#1
|
|||
|
|||
|
Hi, fellow forumers. I have several macros that I wish to execute across a file on import. I know you can execute VBA on close, save, even open, but I'm struggling to find the correct syntax to invoke macros after I've imported text into my blank file using the Import Text command, not copying and pasting. Of course, the code below is very rudimentary and it could well be that this is not a possibility in Word, but i'm hoping it is. The doc event listed below (Document_FileImport) is, of course, fictional. If anyone at least knows what the event name is, that would help immensely. Thanks for your help in advance.
Code:
Private Sub Document_FileImport() Call Macro1 Call Macro2 Call Macro3 Call Macro4 Call Macro5 End Sub |
|
#2
|
||||
|
||||
|
Presumably you want something like:
Code:
Sub InsertFile()
With Dialogs(wdDialogInsertObject)
.Tab = 1
.DisplayIcon = False
.Link = False
If .Show = True Then
Call Macro1
Call Macro2
Call Macro3
Call Macro4
Call Macro5
End If
End With
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How to execute .exe file after opening an Excel file?
|
S3CRET | Excel Programming | 2 | 11-08-2015 12:33 AM |
| import outline into existing file | eNGiNe | PowerPoint | 0 | 02-18-2015 05:56 AM |
| import .mht file data to powerpoint | Rubini MJ | PowerPoint | 0 | 07-24-2013 10:24 PM |
Import HTML into Word .doc file?
|
Clueless in Seattle | Word | 1 | 07-31-2012 12:12 PM |
OST file import
|
duanne14 | Outlook | 3 | 03-13-2011 07:48 AM |