Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!cunixf.cc.columbia.edu!gg2 From: gg2@cunixf.cc.columbia.edu (Guy Gallo) Newsgroups: comp.windows.ms Subject: Re: WfW Macro FileOpen Convertion confirmation Message-ID: <1991Mar16.203749.21061@cunixf.cc.columbia.edu> Date: 16 Mar 91 20:37:49 GMT References: <1991Mar12.164620.10454@vaxa.strath.ac.uk> Reply-To: gg2@cunixf.cc.columbia.edu (Guy Gallo) Organization: Columbia University Lines: 33 In article <1991Mar12.164620.10454@vaxa.strath.ac.uk> cids05@vaxa.strath.ac.uk (@Dr Stephen K Tagg@) writes: >This is addressed to any Word for Windows Macro experts in the net > >I have the boring task of converting all the .RFT files on a floppy to >MAC Word format. (some of our staff are moving from system/36 to MACs) >so I have attempted to write a macro to automate this. > >The only problem is the FileOpen command >when I get it to open the next file on the list correctly it insists >on bringing up a dialogue box in which I have to reply OK to confirm that >I want the file converted from .RFT format. > >I tried SendKeys and OK after the FileOpen statement but they had no effect. > Try placing the SendKeys statement *Before* FileOpen. SendKeys places a keys sequence in the buffer, and those keys act AFTER the next dialog box/command. So, if you have RFT (or is that RTF) associated with the proper conversion DLL in your Win.ini, then opening a file of that extension will automatically place the selection on the correct conversion during the conversion dialog box/confirmation. All you have to do is send a carriage return: Dim dlg As FileOpen dlg.Name = "*.RTF" dialog dlg SendKeys "{Enter}" FileOpen dlg.Name Would show you a fileOpen dialog box with just RTF files, and then auto- matically convert it.