PDA

View Full Version : How to insert a SHIFT ENTER at the end of the line in word using VBA and also macro s



harikris21
06-23-2013, 05:06 AM
Hi All,


Please find below details of my query.



1. Version of word is 2007
2. I have some data in word document which needs to be given shift enter at the end of line.
3. I need this macro for entire document because if i just record the macro to insert "SHIFT ENTER", macro is not working and it is just getting struck at the end of paragraph because there is already a ENTER.


Regards,
Hari

fumei
06-23-2013, 03:03 PM
You are going to have to explain your difficulty better. Recording a Shift-Enter gets:

Selection.TypeText Text:=Chr(11)

If gou fire the macro that is exactly what you get...a Shift-Enter.

Please try to not use phrases like "macro is not working". It is meaningless, as it says nothing at all.

harikris21
06-23-2013, 11:25 PM
Hi,

I am really sorry to use the word macro not working

Thanks for your help and macro is working fine with
Selection.TypeText Chr(11)

fumei
06-24-2013, 04:48 PM
I did not give any help whatsoever. I simply repeated what you SAID you did - recorded a macro to insert a Shift-Enter. Perhaps you recorded something else.