I have a file that i need to change that does not have a .txt but i can use notepad to open and manipulate by the open with notepad command
I have used the excel shell commend
Dim MyTxtFile
MyTxtFile = Shell("C:\WINDOWS\notepad.exe C:\TRUSTED DOCUMENTS\File Conversion\3123100 - HULU 5.wdp", 1)
and this will open the file inside of notepad that i can then use excel to change all the parts i need to do
but i don't want to hard code the location since it will change from project to project so i added this to do the file location
With Application.FileDialog(msoFileDialogFilePicker)
If .Show <> 0 Then
OrgWdpFile = .SelectedItems(1)
End If
End With
MyTxtFile = Shell("C:\WINDOWS\notepad.exe" & OrgWdpFile,1)
It finds the file but when i combine the variable i get an run time error 53
why by adding the variable not work ? it has the correct syntax that i know of?
I have tried using a copy of the wdp file as a .txt and still won't work it has something to do with using a variable?
also when i use the full text path i get some random number that make no sense and it changes each time i run the code what is this number that is not getting generated when i add the variable?
Can any one help
I have used the excel shell commend
Dim MyTxtFile
MyTxtFile = Shell("C:\WINDOWS\notepad.exe C:\TRUSTED DOCUMENTS\File Conversion\3123100 - HULU 5.wdp", 1)
and this will open the file inside of notepad that i can then use excel to change all the parts i need to do
but i don't want to hard code the location since it will change from project to project so i added this to do the file location
With Application.FileDialog(msoFileDialogFilePicker)
If .Show <> 0 Then
OrgWdpFile = .SelectedItems(1)
End If
End With
MyTxtFile = Shell("C:\WINDOWS\notepad.exe" & OrgWdpFile,1)
It finds the file but when i combine the variable i get an run time error 53
why by adding the variable not work ? it has the correct syntax that i know of?
I have tried using a copy of the wdp file as a .txt and still won't work it has something to do with using a variable?
also when i use the full text path i get some random number that make no sense and it changes each time i run the code what is this number that is not getting generated when i add the variable?
Can any one help