word自动保存第一行为文件名的功能在哪里?

以前新建一个microsoft word 文档,在里面打一行字保存,文件名就自动由新建microsoft word 文档变为这一行字,最近不知道怎么这个功能没有了,office还是office,但就是不能保存了,需要手动去改很麻烦,请教在哪里设置这个自动保存。
我的是office2003

此方法是用WORD宏的方法来实现 如果出现用户变量未定义请 在VB编辑器界面选择 工具 引用 找到microsoft scripting runtime , 选中再运行就ok了。News_Content为自定义替换字符。
Option Explicit
Dim arrFiles()
Dim cntFiles%

Sub Main()
Dim i%, StartFolder$, SavePath$
Dim fso As New FileSystemObject, fd As Folder
ReDim arrFiles(1 To 1000)
cntFiles = 0
StartFolder = "D:\Word" '原文件目录
SavePath = "D:\Word2" '改名后的文件目录
Set fd = fso.GetFolder(StartFolder)
SearchFiles fd
ReDim Preserve arrFiles(1 To cntFiles)
For i = 1 To cntFiles
RenameDocument arrFiles(i), SavePath, i
Next i
End Sub

Sub SearchFiles(ByVal fd As Folder)
Dim fl As File
Dim sfd As Folder
For Each fl In fd.Files
If LCase(Right(fl.Path, 4)) = ".doc" Then
cntFiles = cntFiles + 1
If cntFiles >= UBound(arrFiles) Then ReDim Preserve arrFiles(1 To cntFiles + 1000)
arrFiles(cntFiles) = fl.Path
End If
Next fl
If fd.SubFolders.Count = 0 Then Exit Sub
For Each sfd In fd.SubFolders
SearchFiles sfd
Next
End Sub

Sub RenameDocument(ByVal wordFileName, ByVal wordFilePath, ByVal num)
On Error Resume Next
Dim myTitle$, myFileName$
Dim mydoc As Document, myRange As Range
Dim News_Content
Set mydoc = Word.Documents.Add
mydoc.Activate
Selection.InsertFile FileName:=wordFileName, Range:="", ConfirmConversions:= _
False, Link:=False, Attachment:=False
ActiveWindow.View.Type = wdPageView
Set myRange = mydoc.Paragraphs.First.Range
myRange.SetRange myRange.Start, myRange.End - 1

News_Content = Trim(myRange.Text)
News_Content = Replace(News_Content, "!", "_")
News_Content = Replace(News_Content, "/", "")
News_Content = Replace(News_Content, "。", "")
News_Content = Replace(News_Content, " ", "")
News_Content = Replace(News_Content, "(", "")
News_Content = Replace(News_Content, ")", "")
News_Content = Replace(News_Content, "“", "")
News_Content = Replace(News_Content, "”", "")
News_Content = Replace(News_Content, " ", "")

myTitle = News_Content
If (myTitle = "") Or (Len(myTitle) > 50) Then
Debug.Print "ERR:--------------------------------------------" + wordFileName
Shell "cmd.exe /c echo " & "ERR:--------------------------------------------" & wordFileName & ">>D:\Word.log"
mydoc.Close SaveChanges:=wdDoNotSaveChanges
SendKeys ("{ESC}")
Exit Sub
End If
myFileName = wordFilePath + "\" + myTitle + ".doc"
mydoc.SaveAs myFileName
mydoc.Close SaveChanges:=wdDoNotSaveChanges
Debug.Print num & ":" & wordFileName & "=" & myFileName
Shell "cmd.exe /c echo " & num & ":" & wordFileName & "=" & myFileName & ">>D:\Word.log"
End Sub追问

看不懂,简单点

温馨提示:答案为网友推荐,仅供参考
第1个回答  2015-12-02
先将第一行字设置为标题,然后再保存或另存为,就能出现。追问

实际上并不能

追答

选中文字,在格式中设置为“标题1”,再另存为——,试一下。

本回答被提问者采纳
第2个回答  2015-12-02
CTRL+S 就可以直接保存你第一个标题了啊 我的也是2003的
第3个回答  2015-12-02
microsoft word软件默认就是第一行。你修复office追问

怎么修复

追答

进入控制面板,程序,找到office进行修复

追问

你的才是最简单实用的方法,抱歉,手快了点错了答案。还是感谢您

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网