Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2000 macro and save to notepad 1

Status
Not open for further replies.

jfhewitt

Technical User
Jun 6, 2000
287
US
Two Word 2000 questions:
1. Can I save a word doc to notepad in a word macro?
2. Can I save a mail merge doc in notepad format?
Essentially, I need the data in text editor format, not a txt document in Word. TIA
 
No...it seems it must be in a plain text editor like Notepad.
 
Not sure you can do what you need to achieve. Have you thought about using Wordpad maybe. The other option you have is SAVE-AS types such as MS-DOS TEXT (WITH LINEBREAKS) which is about as basic as you can get.

The only other option that I can think of, especially is you want to go the macro route is you can record keystrokes using tools that record such things and save the document to Notepad. Keystroke recording tools can be found at
 
I think you may be right...a third party macro program might be the only way to go. There seems to be no way to call up notepad from a Word macro. I can save the file as a "TXT" file, but it must be put into notepad manually. In case you are curious, I'm trying to write a macro to permit using mailmerge on an Acrobat FDF file, thereby populating a PDF form from an external database. Thanks for your help.
 
Here's a way to run notepad from Word
Code:
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 12/19/01 by ISA
'
    Selection.WholeStory
    Selection.Copy
    Application.Run MacroName:="RunNotepad"
End Sub
Sub RunNotepad()
    RetVal = Shell("C:\WINDOWS\notepad.EXE", 1)    ' Run notepad.
End Sub
Skip,
metzgsk@voughtaircraft.com
 
Thanks...the Shell function will call up NotePad...but that's it. I'm trying to figure a way for the Word macro to paste the data into NotePad and then save it to a PDF file. I thought AppActivate might do it, but doesn't seem to work. I guess the basic question is how extensive is an Office macro when you are going into external programs? Will it ever cross over?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top