![]() ![]() ![]() This is because editpad supports wildcard file names, while notepad does not. If I instead type in "EditPad *.txt", Editpad (a notepad.exe alternative) will load all. If I open a CMD shell window and manually type in C:\Windows\system32\notepad.exe *.txt, I'll get an error message. Sub MacroAttempt2()ĭim filename2 As StringĢ) You cannot use shell to make notepad do what it otherwise won't do from the command line. Is it possible to integrate such an editor into Access (2007) in place of the existing editor and does NP support VBA ie syntax /variable checking, etc. Sub MacroAttempt1()ĭim filename1 As String I saw a post the other day by Micheal concerning using Notepad as a text editor. How would I fix this macro, so that it opens the TXT file beginning with the first part of the filename? However, the second macro, MacroAttempt2, which is supposed to open the TXT file beginning with the first part of the filename "1234" and an asterisk ("*") and ends with "(TXT).TXT" does not work. The first macro, MacroAttempt1, works successfully. public sub closenotepad () dim owdapp as word.application dim otask as task dim bcreate as boolean on error resume next set owdapp getobject (, 'word.application') on error goto 0 if owdapp is nothing then set owdapp createobject ('word.application') owdapp.visible false bcreate true end if for each otask in owdapp. Shell ("C:\Windows\system32\notepad.exe"
0 Comments
Leave a Reply. |