Link to home
Start Free TrialLog in
Avatar of SpencerSteel
SpencerSteel

asked on

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
.Open
.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 !

Thanks,

S.S.
ASKER CERTIFIED SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SpencerSteel
SpencerSteel

ASKER

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 !

S.S.