1

Let's say I leverage the info in these following answers..

to creat a "New RTF Document" menu item to Initiate/ Invoke creation of a RTF Document.


How, can I get "Word 2010" and "Write/ Wordpad" to default to do so, using a Narrow (0.5) or Custom Page Layout?


  • I know I can change Margins after opening the document. But to do it every time for every New RTF is too much effort.

  • Also, I know there are some "Default" templates/ mechanisms that Word defaults to when it creates a New Document

But I am not sure if and how I can leverage them to work/ apply when a file's created via the context menu "New > RTF Document"?

  • Current OS: Win 8.1 Pro - 6.3 Build 9600
  • Microsoft Office 2010

Update: Export from Registry key for RTF:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT.rtf] @="Word.RTF.8" "Content Type"="application/msword" "PerceivedType"="document"

[HKEY_CLASSES_ROOT.rtf\OpenWithList]

[HKEY_CLASSES_ROOT.rtf\OpenWithList\WordPad.exe] @=""

[HKEY_CLASSES_ROOT.rtf\OpenWithProgIDs] "calibreViewer64bit.AssocFile.RTF"=hex(0): "calibre64bit.AssocFile.RTF"=hex(0):

[HKEY_CLASSES_ROOT.rtf\PersistentHandler] @="{2e2294a9-50d7-4fe7-a09f-e6492e185884}"

[HKEY_CLASSES_ROOT.rtf\ShellEx]

[HKEY_CLASSES_ROOT.rtf\ShellEx{8895b1c6-b41f-4c1c-a562-0d564250836f}] @="{84F66100-FF7C-4fb4-B0C0-02CD7FB668FE}"

[HKEY_CLASSES_ROOT.rtf\ShellNew] "ItemName"=hex(2):40,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,\ 69,00,6c,00,65,00,73,00,25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,\ 00,20,00,4e,00,54,00,5c,00,41,00,63,00,63,00,65,00,73,00,73,00,6f,00,72,00,\ 69,00,65,00,73,00,5c,00,57,00,4f,00,52,00,44,00,50,00,41,00,44,00,2e,00,45,\ 00,58,00,45,00,2c,00,2d,00,32,00,31,00,33,00,00,00 "Data"="{\rtf1}"

[HKEY_CLASSES_ROOT.rtf\Word.RTF.8]

[HKEY_CLASSES_ROOT.rtf\Word.RTF.8\ShellNew]

Alex S
  • 1,019

2 Answers2

2

Create a sample .RTF file using Microsoft Word

Create a RTF file using Microsoft Word, with the desired margin settings and page layout options. Save the file as template.rtf in the following folder:

%AppData%\Microsoft\Templates

Backup .RTF file type settings

Open a Command Prompt window, and run the following command to backup the existing .RTF file type settings:

reg export hkcr\.rtf  %userprofile%\desktop\rtf_fta.reg

This creates a file named rtf_fta.reg on your desktop.

Apply the REG fix below

Copy the following contents to Notepad and save the file with .REG extension, let's say rtf_template.reg. Double-click the file to apply the settings in the registry.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.rtf]
@="Word.RTF.8"

[HKEY_CLASSES_ROOT\.rtf\Word.RTF.8\ShellNew]
"FileName"="template.rtf"
"NullFile"=-

That's it. When you create a new .RTF document from the right-click menu, it uses template.rtf as the source or template file, and the newly created file will have the same page layout settings as the source.

This above applies only if you open .RTF files using Microsoft Word.

Note: After running the REG file, you may in some cases need to re-associate .RTF file types with Microsoft Word using the Open with dialog.

w32sh
  • 12,379
1

My system = Windows 10 Pro/64bit. What worked for me:- I placed my default RTF template in:

"%AppData%\Microsoft\Windows\Templates\"

I called my template file:

   "RTF_Windows_Template.rtf"

I edited the following Registry Key (I did not touch the key's default value. ); add the key if it is missing:

   HKEY_CLASSES_ROOT\.rtf\ShellNew

I added/edited the following entry under this key:

HKEY_CLASSES_ROOT\.rtf\ShellNew Name:FileName; Type:String (REG_SZ); Data: RTF_Windows_Template.rtf

I added/edited the following entry under the same key (I did not enter anything in its Data Value): HKEY_CLASSES_ROOT.rtf\ShellNew Name:NullFile; Type:String (REG_SZ)

The result when using the background context "New" menu was that "Rich Text Document" appeared and the resulting new file was based on my template.

I hope this is of use to others.

OldGit
  • 11