Re: common dialog control in word VBA by Jonathan
Jonathan
Wed Feb 15 05:35:01 CST 2006
Hi Martin,
You don't need to use the common dialog at all for this. If you are using
office XP or later, you can use the Application.FileDialog object to display
a dialog allowing the user to pick a file.
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
"Martin" <martin@kwhrnetwork.com> wrote in message
news:%23904NzhMGHA.140@TK2MSFTNGP12.phx.gbl...
> Hi
>
> I have written a macro that pulls data in from an excel sheet and puts it
> in a word doc.
>
> I want to allow the user to select which excel file they want to use by
> ideally using the common dialog control to allow them to navigate to the
> file they want.
>
> Is there any way of doing this, particularly without using a form to
> trigger the dialog control.
> I have had a look round the net and it seems a WinAPI call(s) are
> required.
>
> Any help would be appreciated.
>
> Thanks
>
> Martin