Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-22-2021, 06:35 AM
scienceguy scienceguy is offline .InitialFileName not showing all of file name with Application.FileDialog(msoFileDialogOpen) Windows 10 .InitialFileName not showing all of file name with Application.FileDialog(msoFileDialogOpen) Office 2019
Advanced Beginner
.InitialFileName not showing all of file name with Application.FileDialog(msoFileDialogOpen)
 
Join Date: Feb 2019
Posts: 46
scienceguy is on a distinguished road
Default .InitialFileName not showing all of file name with Application.FileDialog(msoFileDialogOpen)

Hello,



When I add the .InitialFileName for Application.FileDialog(msoFileDialogOpen), only part of the file is displayed. See screenshot attached. I've seen some solutions online, but I've yet to find one that works. Does anyone know a way around this, please? Here is my code:

Code:
Sub testOpen()

With Application.FileDialog(msoFileDialogOpen)
    .Filters.Clear
    .Filters.Add "Word Files", "*.doc*", 1
    .InitialFileName = "C:\Users\roy\OneDrive\Desktop\test_files\test_file_one.docm"
    If .Show = -1 Then
        strFile = .SelectedItems(1)
    End If
End With
If strFile = "" Then
    Exit Sub
End If

End Sub
Attached Images
File Type: png 2021-11-22.png (42.4 KB, 15 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
are settings saved in application or in pst file dfride Outlook 0 04-13-2021 03:34 PM
.InitialFileName not showing all of file name with Application.FileDialog(msoFileDialogOpen) I need an application to file and access files. Balliol Word 2 12-18-2020 06:54 PM
MS Word Error: This file is in use by another application or user conky Word 4 02-26-2019 09:21 AM
.InitialFileName not showing all of file name with Application.FileDialog(msoFileDialogOpen) Word 2007 , when I save a .doc or .docx file the file type is showing "Empty" Tomc29 Word 9 06-10-2015 03:04 AM
Opening a MS .dot file through ASP.Net application eljapo4 Word 0 09-14-2012 01:11 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft