EmEditor Macro Error - 'document' is undefined

133 views Asked by At

I used EmEditor for years now. Now I want to create and use a simple macro. But every time a run a macro I get the error message:

'document' is undefined

1

I can fix the problem by deinstallation and a new installation of Emeditor. But after a reboot, the same error will be show again.

I use EmEditor Professional 64-bit Version 22.2.0 on a Windows 10 22H2.

I had this issue also in the past, on a different notebook. So this issue seems to be independend of my windows installion.

There is no third parts virus scanner installed, only windows defender. EmEditor is installed in the standard path.

This error happens with the default marcos like ValidateXml.jsee or also with self recored and save macros.

2

There are 2 answers

1
Yutaka On BEST ANSWER

If you run EmEditor as Administrator, please run EmEditor as non-Admininistrator. Please run emeditor.exe without a shortcut to see if macros run correctly.

1
TM1 On

Do you can run macro's from clipboard? Please try it for example with "alert(document.name)". Put this between "" to clipboard and select in menu macros - run clipboard. In normal case you get an popup with the actual document name.