

InterviewSolution
Saved Bookmarks
1. |
Solve : Macro in word? |
Answer» <html><body><p>I would like to a create a macro that changes three sentences of text into three different styles – for example the <br/>The article titles should be style ‘Heading 1’ – sentence one<br/>The <a href="https://interviewquestions.tuteehub.com/tag/authors-251134" style="font-weight:bold;" target="_blank" title="Click to know more about AUTHORS">AUTHORS</a> of the article should be style ‘Emphasis’ – sentence two<br/>and the pagination of the article should be in style 'Intense re...' - sentence three<br/><br/>(Please note I’ve used these styles as an example. Actual styles being used are in-house created ‘styles’)<br/>So, I’ve ‘recorded’ this action (see below), when running the macro it is only changing the first sentence to the requested style, my other <a href="https://interviewquestions.tuteehub.com/tag/instructions-1046362" style="font-weight:bold;" target="_blank" title="Click to know more about INSTRUCTIONS">INSTRUCTIONS</a> are ignored – so <a href="https://interviewquestions.tuteehub.com/tag/basically-389413" style="font-weight:bold;" target="_blank" title="Click to know more about BASICALLY">BASICALLY</a> the Macro does not recognize my other instructions – which should be that after each carriage return there is a new sentence which should be ‘<a href="https://interviewquestions.tuteehub.com/tag/styled-2283300" style="font-weight:bold;" target="_blank" title="Click to know more about STYLED">STYLED</a>’ accordingly.<br/>Is this something I’m able to do with a macro or am I being to ambitions? Please note - I cannot dictate what the format of the original text is, as I’m <a href="https://interviewquestions.tuteehub.com/tag/bringing-402272" style="font-weight:bold;" target="_blank" title="Click to know more about BRINGING">BRINGING</a> in data from various sources.<br/><br/>My Macro reads:<br/>Sub BulletinStyle()<br/>'<br/>' BulletinStyle Macro<br/>'<br/>'<br/> Selection.Style = ActiveDocument.Styles("Heading 1")<br/> Selection.Style = ActiveDocument.Styles("Emphasis")<br/> Selection.Style = ActiveDocument.Styles("Intense Reference")<br/>End Sub<br/><br/><br/>Any help is appreciated<br/>Regards,<br/>Wilma<br/></p></body></html> | |