atw: Re: Word macro help

  • From: Nick Shears <nshears@xxxxxxxxxxx>
  • To: "austechwriter@xxxxxxxxxxxxx" <austechwriter@xxxxxxxxxxxxx>
  • Date: Wed, 3 Dec 2014 16:08:29 -0800

Oops! Sorry, guys, I was too hasty. Next time I’ll try not be looking at Word 
and Outlook simultaneously!

Cheers

Nick

From: austechwriter-bounce@xxxxxxxxxxxxx 
[mailto:austechwriter-bounce@xxxxxxxxxxxxx] On Behalf Of Neil Maloney
Sent: Thursday, 4 December 2014 9:41 AM
To: austechwriter@xxxxxxxxxxxxx
Subject: atw: Re: Word macro help

Thanks Kath, answers the mail I just sent ...

Neil.
On 4/12/2014 10:38 AM, Kath Bowman wrote:
Hi Nick,
It is still there (at least in Office 2010), just hidden. If you customise the 
QAT, and in Choose Commands from, select All Commands, you will find Customize 
keyboard. Add that to your QAT and you can easily customise your keyboard.
regards

Kath Bowman
Technical Writer

Direct  +61 8 8343 3865
kath.bowman@xxxxxxxxxxxxxxxx<mailto:kath.bowman@xxxxxxxxxxxxxxxx>

Saab Australia Pty Ltd
21 Third Avenue
Mawson Lakes SA 5095
www.saabgroup.com/au<http://www.saabsystems.com.au/>

[cid:image001.jpg@01D00FA7.3ADAB070]

This e-mail is private and confidential between the sender and the addressee.
In the event of misdirection, the recipient is prohibited from using, copying or
disseminating it or any information in it. Please notify the above of any 
misdirection.

From: 
austechwriter-bounce@xxxxxxxxxxxxx<mailto:austechwriter-bounce@xxxxxxxxxxxxx> 
[mailto:austechwriter-bounce@xxxxxxxxxxxxx] On Behalf Of Nick Shears
Sent: Thursday, 4 December 2014 9:35 AM
To: austechwriter@xxxxxxxxxxxxx<mailto:austechwriter@xxxxxxxxxxxxx>
Subject: atw: Re: Word macro help

Sadly, it seems that KB shortcut customization was removed in Word 2010 and 
remains removed in 2013. L

Nick Shears

From: 
austechwriter-bounce@xxxxxxxxxxxxx<mailto:austechwriter-bounce@xxxxxxxxxxxxx> 
[mailto:austechwriter-bounce@xxxxxxxxxxxxx] On Behalf Of Rhonda Bracey
Sent: Wednesday, 3 December 2014 5:47 PM
To: austechwriter@xxxxxxxxxxxxx<mailto:austechwriter@xxxxxxxxxxxxx>
Subject: atw: Re: Word macro help

You can assign a KB shortcut to any macro or hidden (or not so hidden) Word 
task. See these instructions: 
https://cybertext.wordpress.com/2010/08/30/word-assign-a-keyboard-shortcut-to-a-task/

Instructions are for Word 2003 and 2007; might be slightly different for 
earlier or later versions, but not a lot different.

Rhonda

Rhonda.bracey@xxxxxxxxxxxxxxxx<mailto:Rhonda.bracey@xxxxxxxxxxxxxxxx>
Website: http://cybertext.com.au
Blog: http://cybertext.wordpress.com

From: 
austechwriter-bounce@xxxxxxxxxxxxx<mailto:austechwriter-bounce@xxxxxxxxxxxxx> 
[mailto:austechwriter-bounce@xxxxxxxxxxxxx] On Behalf Of Geoffrey
Sent: Wednesday, 3 December 2014 2:25 PM
To: austechwriter@xxxxxxxxxxxxx<mailto:austechwriter@xxxxxxxxxxxxx>
Subject: atw: Re: Word macro help

Thanks Suzy. That works. But I wish I had a keyboard shortcut. I’m a cat when 
it comes to mice.

Geoffrey Marnell
Principal Consultant
Abelard Consulting Pty Ltd
P: 03 9596 3456
M: 0419 574 668
F: 03 9596 3625
Web: www.abelard.com.au<http://www.abelard.com.au/>

From: 
austechwriter-bounce@xxxxxxxxxxxxx<mailto:austechwriter-bounce@xxxxxxxxxxxxx> 
[mailto:austechwriter-bounce@xxxxxxxxxxxxx] On Behalf Of Suzy Davis
Sent: Wednesday, 3 December 2014 5:06 PM
To: austechwriter@xxxxxxxxxxxxx<mailto:austechwriter@xxxxxxxxxxxxx>
Subject: atw: Re: Word macro help

Hi Geoffrey
Not wanting to do Howard out of paid work, but copy this macro to your Normal 
template

Try this…
Macros:

Click on the Developer tab (if you can’t see it, you can make it visible via 
File > Options)
Click on Record macro, give it a name, and click Keyboard to assign keystroke
Click OK
Stop it.
Doesn’t matter what you do.  This will create it in the Visual Basic area.
Press Alt+F11 will open the VB area
Under Normal you will see Modules>New Macros
Double-click this, and you will see that it has created a Sub [your macro name] 
– the one you just recorded.

In between the Sub and End Sub

Paste this.

Dim myString as String
myString = Selection.Range
Selection.Range = “\(“ & myString & “\)”

Let’s say your macro is called “Test”

Now go into File > Options (assuming you are using Word 2010 or 2013)
Select Quick Access Toolbar
Select Macros in the Choose Commands from box
Select your macro in the list

This will add it to the QAT.
I don’t work with keyboard shortcuts, so hopefully someone can



Kind regards Suzy

Suzy Davis
Microsoft Word Templates, Apps for Microsoft Office
& Documentation Projects
[cid:image002.png@01D00FA7.3ADAB070]<http://www.appsforoffice.com/>

[cid:image003.png@01D00FA7.3ADAB070]<http://au.linkedin.com/pub/suzy-davis/6/5ba/4b1>[cid:image004.png@01D00FA7.3ADAB070]<http://www.facebook.com/pages/Apps-for-Office/136256423063414>
 [cid:image005.png@01D00FA7.3ADAB070] <http://twitter.com/#%21/AppsForOffice>
www.appsforoffice<http://www.appsforoffice.com/>.com

If you spend 80% of your document time
on formatting, instead of writing and perfecting

The APPS FOR OFFICE system has been designed for you:
apps FREE  - quick easy formatting shortcuts (it’s free)
apps WorkSmart -  try for 30 days (includes report & proposal templates)

www.appsforoffice.com/wp-html/products.html<http://www.appsforoffice.com/wp-html/products.html>

Support: support@xxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxx>
Forum: http://appsforoffice.freshdesk.com/support/discussions

PO Box 404
Brighton VIC 3186
(Melbourne) Australia
Direct +61 3 9593 6568
Mobile +61 433 489 989
Email suzy.davis@xxxxxxxxxxxxxxxxx<mailto:suzy.davis@xxxxxxxxxxxxxxxxx>

From: 
austechwriter-bounce@xxxxxxxxxxxxx<mailto:austechwriter-bounce@xxxxxxxxxxxxx> 
[mailto:austechwriter-bounce@xxxxxxxxxxxxx] On Behalf Of Geoffrey
Sent: Wednesday, 3 December 2014 4:44 PM
To: austechwriter@xxxxxxxxxxxxx<mailto:austechwriter@xxxxxxxxxxxxx>
Subject: atw: Re: Word macro help

Hi Howard

Is it possible with VBA to wrap selected text in some specified characters?

The background is this: I have a lot of mathematics that is partially 
Latex-compliant, but I need to insert the opening Latex characters (\() and the 
closing Latex characters {\)). For example, I have 3^x-2 in the manuscript and 
I want quickly change that to \(3^x-2\). It would be good if I could just 
select 3^x-2, press a key combination and get \(3^x-2\).

Is this do-able? What fee would you charge for designing the macro?

Cheers

Geoffrey Marnell
Principal Consultant
Abelard Consulting Pty Ltd
P: 03 9596 3456
M: 0419 574 668
F: 03 9596 3625
Web: www.abelard.com.au<http://www.abelard.com.au/>

From: 
austechwriter-bounce@xxxxxxxxxxxxx<mailto:austechwriter-bounce@xxxxxxxxxxxxx> 
[mailto:austechwriter-bounce@xxxxxxxxxxxxx] On Behalf Of Howard Silcock
Sent: Wednesday, 3 December 2014 10:06 AM
To: austechwriter@xxxxxxxxxxxxx<mailto:austechwriter@xxxxxxxxxxxxx>
Subject: atw: Re: Word macro help

Try replacing .Wrap = wdFindAsk with .Wrap = wdFindStop

​Howard

On 3 December 2014 at 09:23, Geoffrey 
<geoffrey@xxxxxxxxxxxxxx<mailto:geoffrey@xxxxxxxxxxxxxx>> wrote:
Hi austechies

I’m stuck with a Word macro. All I want to do is have = replaced by &amp;= in a 
selection of text. This is the code that the record macro command generates:

Sub equals()
'
' equals Macro
'
'
    With Selection.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Text = "="
        .Replacement.Text = "&amp;="
        .Forward = True
        .Wrap = wdFindAsk
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .Execute Replace:=wdReplaceAll
End With
End Sub

The problem is that this macro replaces = with &amp;= throughout the entire 
rest of the document, not just in the text selected. That’s not what I want.

Any ideas?


Geoffrey Marnell
Principal Consultant
Abelard Consulting Pty Ltd
P: 03 9596 3456
M: 0419 574 668
F: 03 9596 3625
Web: www.abelard.com.au<http://www.abelard.com.au/>



JPEG image

PNG image

PNG image

PNG image

PNG image

Other related posts: