|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
.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 |
#2
|
|||
|
|||
I am unable to reproduce the error here.
Is the initial file name accurate ? Does the initial file exist in the directory named in the code ? |
#3
|
|||
|
|||
Hi Logit,
Interesting, you can't reproduce the error. The answer is "yes" to both of your questions. Thanks, Roy |
#4
|
|||
|
|||
Maybe someone else has an answer to the error. Sorry.
|
#5
|
|||
|
|||
If it's a short file name, it will work, but if it's longer, such as the one in my example, it fails to show the entire name.
|
|
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 |
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 |
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 |