excuse me my simple question...
In my .mvba macro, I do some operations on text elements. After all changes are applied, I save new text contents to .txt file. So far, so good.
The problem is that I cannot open the file from .mvba. I tried Shell command and it didn't work.
My command was:
Shell ("C:\Documents and Settings\R\My Documents\test.txt")
and I got a message saying "invalid procedure or called argument".
What did I do wrong?
Maybe there is another way for opening text files? Thank you for any tip.
if you want to openthe text file in an associated text editor (e.g. Notepad) only, you can use CadInputQueue.SendKeyin "%c:\...path to your text file.txt". It's a "MicroStation solution", but you can also start text editor directly from VBA, there are plenty of descriptions how to do it available on Internet.
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
railab2008 said:In my .mvba macro
Please post questions about VBA and macro development to the VBA Forum.
Regards, Jon Summers LA Solutions
railab2008 said:Maybe there is another way for opening text files?
There's another way to open files of any type from VBA.
This article describes Windows File Associations, and a utility that you can call from VBA to open a document using its associated application. That is, you can open a Word, Excel, Text or whatever document.
Thank you all for the tips. I will check them all. Sorry for posting not in a correct forum.