VBA: Automate Word 'Convert File from' popup

Hello there.

I am running an Access VBA routing that imports 150,000 CVs.

It uses something like

Dim stm as adodb.stream

with stm
.type = adTypeBinary
.LoadFromFile myFilename

This works well but it Word stop the routine with the 'Convert File from:' (.txt, .rft, etc, etc) pop up quite regularly ... the annoying thing is that the default always works.

I was thinking perhaps I could use

Sendkeys "{ENTER}"

but the Access code never hits that line, as it's waiting on the previous .LoadFromFile.

Is there anyway of stopping the Covert File popup, or a way of sending an ENTER keystroke or somethign ... i really don't want to have to sit here and watch this !


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If you are using word automation, use the second parameter of application.documents.open

wrdApp.Documents.Open myFilename, False  'False tells it not to display the conversion dialog.

Click on Open method as applies to Documents...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SpencerSteelAuthor Commented:
You are bang on with this ! Excellent ... i was using the wrdApp.Documents.Open myFilename during a routine that sucks out the text ... just changing that parameter has sorted it and i'm really happy !

Thanks so much !

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.