Hey guys,
i was working today on Microsoft word 2007.
their on the first line, as soon as try to save the file, then one sentence is written automatically.
the sentence is like this

This text was added by using code.

if i try to remove that sentence then also , it comes again. if i try to save the file then, this sentence is included again.
is any one had gone through this kind of error?
if i try to take new file now, then also in new file if i don't write any thing, and then i save the file then this sentence is auto. included in the file.

  • 1
    please change the question title to something meaningful. e.g. "Why is a sentence automatically added on saving a file?" – Tobias Kienzler Jun 15 '10 at 8:57

It might be a VB macro that is stored in the Normal.dot template and that runs on the document save event.

This Microsoft tutorial gives an overview of the Word macro system and how to open the macro editor and browse existing macros. It could help:



It could be ANY global add-in (check the Templates and Add-ins dialog)

If it is not a VBA macro in Word, SOMETHING is hooking into Word, such as a COM add-in. You should also check the Word | Options | Add-Ins dialog and note any "Active Application Add-ins". Also note that other Office applications, such as Excel, can have their own VBA macros which send messages to Word here. Judging by the "This text was added by using code.", my guess is that someone went through a sample tutorial on how to programatically type text in a Word document, and this command runs in the DocumentBeforeSave event.

I hope you resolved it! It would be nice to know how it was resolved.


Delete two files Normal.dotm and NormalEmail.dotm from C:\Users\admin\AppData\Roaming\Microsoft\Templates.

It worked fine for me.


I also faced the same issue "This text was added by using code".I resolved this issue in my Excel through these following steps:

Open the New Excel sheet-->file-->options-->select "Add-Ins" option-->goto "Manage"-->select "COM Add-Ins"-->Select Go-->here Uncheck the "ExcelAddIntest"-->Click "Ok".......Done...

Still if it doesn't get resolved try deleting "Normal.dotm" ,"NormalEmail.dotm" by going to this link -->["C:\Users\admin(may be ur account name)\AppData\Roaming\Microsoft\Templates]. But I don't think there is no need of deleting these files.....just try...all d best guys...

  • Deleting random files without knowing what they do or why they're there is a bad idea and can often cause problems even if it solves the immediate problem. – David Richerby Mar 19 '16 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.