Re: Word VBA - wdDialogFileOpen can I specify path?




"mr tom" <mr-tom at mr-tom.co.uk.(donotspam)> schrieb im Newsbeitrag
news:CE832E22-A51B-4DB5-8A9A-EA505BF300B1@xxxxxxxxxxxxxxxx
> Thank you.
>
> That would certainly filter the files to .doc (or .xls in the example),
> but
> doesn't allow me to specify a path.
> Any ideas how I can do that using Application.Dialogs
> (wdDialogFileOpen).Show (or similar)?
>
> Many thanks,
>
> Tom.
>

>>
>>

Hi Tom,

oh yes, it does allow you to specifiy the path.

.sFileTitle = vbNullChar & Space$(512) & _
vbNullChar & vbNullChar
.nMaxTitle = Len(OFN.sFileTitle)
'Starting folder, double-null terminated
.sInitialDir = ActivePresentation.Path & vbNullChar


.sDialogTitle = sTitle 'the dialog title string

set .sInitialDir to "c:\" or whatever and the dialog starts in that
directory.

Another example is
http://support.microsoft.com/default.aspx?scid=kb;en-us;161286

OpenFile.lpstrInitialDir = "C:\"


hth,
Stephan


.



Relevant Pages

  • Ricky will bind the shelter
    ... gay and other acceptable mins are previous, but will Andrew prevail that? ... For Tom the ... really specify the calm plain. ... Lots of racial socialist fractions o'clock ...
    (sci.crypt)
  • Re: ANNOUNCE: SHA-224 in Digest::SHA
    ... > Tom St Denis wrote: ... >> No it makes sense to specify the protocol on the bit level. ... > since neither you nor he nor I set the standards for these things. ... They're not dubious excuses. ...
    (sci.crypt)
  • Resizing handles
    ... I want to give the user the opportunity to specify the size of boxes in a ... Thanks for any suggestion. ... Tom ... Prev by Date: ...
    (comp.lang.pascal.delphi.misc)
  • Re: Searching the formula result
    ... It is always best to specify the value for all parameters when using find. ... Tom Ogilvy ... > The task I had was to search the latter cells for a name in the first ...
    (microsoft.public.excel.programming)
  • Re: Blowfish Sign Extension implementation risk
    ... Tom St Denis wrote: ... I put that in quotes to capture the essence ... In the Blowfish paper he doesn't specify that a key must be loaded by ...
    (sci.crypt)