Convert .spf files (Shorthand) into Microsoft Word Autocorrect?

techgirl

Board Regular
Joined
Sep 16, 2002
Messages
178
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I have this software called "Shorthand for Windows" by OfficeSoftLLC. I need to be able to export or convert .spf files (Shorthand) to .txt files for Autocorrect? Or a way to import the .spf entries directly into an autocorrect file ?? The company does NOT have a converter, and Microsoft has no idea how to do this. Any help would be great.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
How do I print the contents of a dictionary?

You can print the contents of a dictionary to a text file by selecting "Print to File" from the File Menu.
That doesn't work?
 
Upvote 0
No. When I PrintFile from the software, it only exports the first line, and there are 571 entries.
 
Upvote 0
Is "PrintFile" the same as "Print to File"?

If the company has said they don't have a converter, what do they say about only printing the first line?
 
Upvote 0
I have this software called "Shorthand for Windows" by OfficeSoftLLC. I need to be able to export or convert .spf files (Shorthand) to .txt files for Autocorrect?
Converting your to txt files is one thing; converting them to Word's AutoCorrect .acl files is quite another. Those are not simple text files as you will see if you navigate to:
C:\Users\%Username%\AppData\Roaming\Microsoft\Office\
and open one in, say, NotePad.

Once you have the .spf files converted to text files, you'd need to reduce them to basically two columns, perhaps in CSV or tab-separated format, so you could add the entries to Word via a macro that processes each entry in the form of:
AutoCorrect.Entries.Add Name:="AAA", Value:="BBB"
where "AAA" is the text to be replaces and "BBB" is the replacement.

Before running such a macro, you'd probably need to eliminate any entries that already appear in Word - I have no idea what would happen with duplicates.

Having had a look at the OfficeSoftLLC site and the way its autocorrects are constructed, I'm not overly confident that even with all this re-processing they'd translate directly into something Word could use.
 
Last edited:
Upvote 0
Our programmer was able to convert the file to an excel file. So is there an easy way to import this into an acl file ??
 
Upvote 0
With input like this ...

A​
B​
1​
Test1Testout1
2​
Test2Testout2

... this worked fine for me:

Code:
Sub AutCorrect()
  Dim appWd         As Word.Application
  Dim iRow          As Long

  Set appWd = New Word.Application
  For iRow = 1 To Cells(Rows.Count, "A").End(xlUp).Row
    appWd.AutoCorrect.Entries.Add Name:=Cells(iRow, "A").Value, _
                                  Value:=Cells(iRow, "B").Value
  Next iRow

  appWd.Quit
End Sub
I didn't see any deleterious effects of running it twice.
 
Last edited:
Upvote 0
Thank you. But do I add this code into Excel or Word? I've tried both and neither work. In word, I get a compile error at the "Cell" entry, in excel it stops at the Word.application. Not sure how to set this up. ??
 
Upvote 0
Sorry --it goes in Excel, and you need to set a reference to Word: Tools > References, tick Microsoft Word X.X Object Library.

EDIT: Or, still in Excel, you could late-bind and not set a reference:

Code:
Sub AutCorrect()
  Dim iRow          As Long

  With CreateObject("Word.Application")
    For iRow = 1 To Cells(Rows.Count, "A").End(xlUp).Row
      .AutoCorrect.Entries.Add Name:=Cells(iRow, "A").Value, _
                               Value:=Cells(iRow, "B").Value
    Next iRow
    .Quit
  End With
End Sub
 
Last edited:
Upvote 0
Thank you, it worked perfect. Now, may I ask two final questions... 1. If I import another file, does it overwrite my existing .acl words? 2. I tried to change the word "add" in the VB code, to ."delete" and it does NOT remove them, I get a VB error. What is the code to remove an entry?
 
Upvote 0

Forum statistics

Threads
1,214,974
Messages
6,122,536
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top