如何将Microsoft Word文档另存为网页

您所在的位置:网站首页 网页能保存为word吗 如何将Microsoft Word文档另存为网页

如何将Microsoft Word文档另存为网页

2023-12-26 22:38| 来源: 网络整理| 查看: 265

You may not think of Word as a tool for designing web pages, and that’s okay—it’s really not very good at it, anyway. But, if you have an existing Word document that you need to turn into a web page for whatever reason, Word has you covered with some built-in tools.

您可能不会将Word视为设计网页的工具,这没关系-无论如何,它确实不是很好。 但是,如果您有现有的Word文档,无论出于何种原因都需要将其转换为网页,则Word可以为您提供一些内置工具。

Note: We’re using Word 2016 in our examples for this article, but the ability to save a document as a web page (or HTML) has been available in many past versions of Word. If you’re using a version older than Word 2016, you might not see all the features we describe in this article, but you’ll be able to follow along with most of it. 

注意 :在本文的示例中,我们使用的是Word 2016,但是许多以前的Word版本都提供了将文档另存为网页(或HTML)的功能。 如果您使用的版本早于Word 2016,则可能看不到我们在本文中介绍的所有功能,但是您将能够跟随其中的大多数功能。

如何将文档另存为网页 (How to Save Your Document as a Web Page)

First, open up the document you’d like to save as a web page. On the File menu, choose the “Save As” command, and then click the “Browse” option.

首先,打开要保存为网页的文档。 在文件菜单上,选择“另存为”命令,然后单击“浏览”选项。

In the Save As window, navigate to where you’d like to store your file. Then, type a name for your page into the “File Name” box. By default, the name of your Word document will already be filled in if you’ve saved it previously.

在“另存为”窗口中,导航到您想要存储文件的位置。 然后,在“文件名”框中键入页面的名称。 默认情况下,如果您以前保存过,Word文档的名称将已经填写。

Next, click the “Save As Type” dropdown menu. On the menu, you’ll find three options for saving your document as a web page: Single File Web Page; Web Page; and Web Page, Filtered.

接下来,点击“另存为类型”下拉菜单。 在菜单上,您将找到三个用于将文档另存为网页的选项:单文件网页; 网页; 和网页,已过滤。

All of these options will convert your document to HTML (Hypertext Markup Language), the standard for displaying text on a web page. However, each file type produces a slightly different kind of HTML file. Which one you should use depends on your online publishing preferences and whether or not you plan to convert the file back to a Word document later.

所有这些选项都会将您的文档转换为HTML(超文本标记语言),HTML是在网页上显示文本的标准。 但是,每种文件类型都会产生略有不同HTML文件。 您应该使用哪一个取决于您的在线发布首选项,以及您是否打算在以后将文件转换回Word文档。

Let’s take a closer look at those three options.

让我们仔细看看这三个选项。

将文档另存为过滤后的网页 (Save Your Document as a Filtered Web Page )

In most cases, the Filtered Web Page option is the best way to save a Word document as a web page. It preserves your document’s content and formatting, but strips out a bunch of extra HTML code that you just don’t need, and keeps the file size small. This gives you the cleanest code and fastest page loading time for your web page, but it also strips Word-specific formatting elements from the document. You should only choose this file type if you don’t plan to convert the web page back to a Word document later—which, let’s face it, isn’t really a thing people do often.

在大多数情况下,“过滤的网页”选项是将Word文档另存为网页的最佳方法。 它保留了文档的内容和格式,但去除了一堆您不需要的额外HTML代码,并使文件尺寸较小。 这样可以为您的网页提供最干净的代码和最快的页面加载时间,但同时也会从文档中删除特定于Word的格式设置元素。 仅当您不打算稍后再将网页转换回Word文档时,才应选择此文件类型-面对现实,这并不是人们经常做的事情。

In the Save as Type dropdown, click the “Web Page, Filtered” option.

在“保存类型”下拉列表中,单击“已过滤的网页”选项。

Click the “Change Title” button.

点击“更改标题”按钮。

In the menu that appears, type a title for your web page, and then click the “OK” button.

在出现的菜单中,为您的网页键入标题,然后单击“确定”按钮。

A warning box appears asking if you’re sure you want to convert the document to an HTML file, because it will remove Office-specific tags and features. Click the “Yes” button.

出现一个警告框,询问您是否确定要将文档转换为HTML文件,因为它将删除Office特定的标记和功能。 点击“是”按钮。

Now, you’ll have a web page saved to your chosen location. You can load it up in your browser to check it out, or upload it to your web site. By default, Word saves the actual html file in whatever folder you selected, and all the supporting images on the page to a subfolder. And, you’ll need to upload that folder of images to your website, too.

现在,您将有一个网页保存到您选择的位置。 您可以将其加载到浏览器中以将其签出,或将其上传到您的网站。 默认情况下,Word将实际的html文件保存在您选择的任何文件夹中,并将页面上的所有支持图像保存到子文件夹中。 而且,您还需要将该图像文件夹上传到您的网站。

Although, as we’ll talk about a bit later, you can change that default behavior.

尽管,稍后我们将讨论,您可以更改默认行为。

将文档另存为网页 (Save Your Document as a Web Page )

The “Web Page” option on the “Save As Type” dropdown menu works just a bit differently. Just like the filtered option, it saves your web page as an HTML file and saves any supporting images into their own subfolder. However, the “Web Page” option preserves as much of Word’s formatting and extra document information as possible instead of filtering that stuff out.

“另存为类型”下拉菜单上的“网页”选项的工作方式略有不同。 就像过滤选项一样,它将网页另存为HTML文件,并将所有支持图像保存到其自己的子文件夹中。 但是,“网页”选项保留了Word的尽可能多的格式和更多的文档信息,而不是过滤掉那些东西。

And of course, since it saves that information, the resulting will be slightly larger than with a filtered page.

当然,由于它保存了该信息,因此结果将比经过过滤的页面略大。

You’ll have to play with it a bit to see if it really saves the specific types of formatting you need on your page, but it generally does an okay job.

您必须花点时间看一下它是否确实保存了页面上所需的特定类型的格式,但是它通常做得很好。

将文档另存为单个文件网页 (Save Your Document as a Single File Web Page )

The “Single File Web Page” option does save all possible formatting information (just like the “Web Page” option), but instead of saving images into a separate folder, it saves all your supporting images and the page itself as part of the same MHTML file.

“单个文件网页”选项确实保存了所有可能的格式信息(就像“网页”选项一样),但是与其将图像保存到一个单独的文件夹中,而是将所有支持图像和页面本身保存为同一图像的一部分MHTML文件。

It can be handy for keeping track of pages where you might forget to bring along the separate supporting files, but this option also saves a much larger file. Sometimes, the resulting file size is close to a combination of the size of the page and supporting files (like images). But sometimes, the files can get quite a bit bigger, just depending on what’s getting saved.

这对于跟踪您可能忘了带走单独的支持文件的页面非常方便,但是此选项还可以保存更大的文件。 有时,生成的文件大小接近页面大小和支持文件(例如图像)的组合。 但是有时,文件可能会变得更大,这取决于要保存的内容。

It really not the best option if you’re planning to make the page a part of a web site—at least not one where you want pages to load quickly. But it can be useful in specific circumstances—like when you want to share a document with someone who has no other way to read a Word file (not even the free solutions out there) or PDF.

如果您打算使页面成为网站的一部分,那么它并不是最佳选择-至少不是您希望页面快速加载的地方。 但这在特定情况下很有用-例如,当您想与其他人无法通过其他方式读取Word文件(甚至没有免费的解决方案 )或PDF共享文档时。

Note: If you’ve got a blog, you can also publish a Word document directly to your blog using Word’s sharing features. It works a bit differently than what we’re talking about in this article, so we’re not going to go into detail on it here, but it’s worth checking out.

注意 :如果您有博客,还可以使用Word的共享功能将Word文档直接发布到博客中 。 它的工作方式与我们在本文中讨论的有所不同,因此我们在这里不做详细介绍,但是值得一试。

如何配置其他Web选项 (How to Configure Additional Web Options )

Word also offers a number of helpful options for customizing how documents are saved as web pages.

Word还提供了许多有用的选项,用于自定义如何将文档另存为网页。

To get to these options, in the Save As menu, open the “Tools” dropdown, and then click the “Web Options” button.

要获得这些选项,请在“另存为”菜单中,打开“工具”下拉菜单,然后单击“ Web选项”按钮。

The Web Options window features five tabs you can use to configure various settings governing how web pages get saved.

“ Web选项”窗口具有五个选项卡,可用于配置用于控制如何保存网页的各种设置。

The kinds of things you can configure on these tabs include:

您可以在这些选项卡上配置的种类包括:

Browser tab: This tab lets you choose a target browser for compatibility reasons (although that setting really doesn’t matter as much these days), allow PNG as a graphics format, rely on CSS for font formatting, and provides a few other small options.

浏览器标签:此标签可让您出于兼容性原因选择目标浏览器(尽管这些设置实际上如今已无关紧要),允许将PNG用作图形格式,依赖CSS进行字体格式设置,以及提供其他一些小选项。

Files tab: The big option on this tab is controlling whether supporting files (like images) are organized into their own folder. If you turn this option off, supporting files are saved to the same folder as the web page. There are also options for configuring whether long file names are used and whether Word updates links when you save the document.

文件标签:此标签上的大选项用于控制是否将支持文件(如图像)组织到它们自己的文件夹中。 如果关闭此选项,则支持文件将保存到网页所在的文件夹中。 还有一些选项用于配置在保存文档时是否使用长文件名以及Word更新链接。

Pictures tab: This tab is used for controlling the screen size and density (pixels per inch) for the target browser. Images and text can wrap differently depending the video resolution at which they’re viewed. The default setting is probably good enough, since you’re not really going to be using Word to create sophisticated web sites. But if you open up your web page and all the text wraps around images in strange ways, this is the option to play with.

图片标签:此标签用于控制目标浏览器的屏幕尺寸和密度(每英寸像素)。 图像和文本的包裹方式可能会有所不同,具体取决于查看它们的视频分辨率。 默认设置可能已经足够好了,因为您将不会真正使用Word创建复杂的网站。 但是,如果您打开网页,并且所有文本都以奇怪的方式环绕在图像周围,则可以使用此选项。

Encoding tab: This tab lets you change the language that the page is encoded in.

编码标签:此标签可让您更改页面编码所用的语言。

Fonts tab: This tab lets you specify the character set and font used on the page. It’s generally good to leave this one alone, because using different fonts in browsers can get weird (you never know which browser people will use). But changing character sets for readers of different languages might be useful.

字体选项卡:此选项卡可让您指定页面上使用的字符集和字体。 通常最好不要使用它,因为在浏览器中使用不同的字体会很奇怪(您永远不知道人们会使用哪种浏览器)。 但是为不同语言的读者更改字符集可能会很有用。

It’s also important to know that these options are set on a per document basis. Set these options on a document, and that document will retain the settings. However, other documents you work with will continue using the default settings.

同样重要的是要知道,这些选项是在每个文档的基础上设置的。 在文档上设置这些选项,该文档将保留设置。 但是,您使用的其他文档将继续使用默认设置。

翻译自: https://www.howtogeek.com/355674/how-to-save-a-microsoft-word-document-as-a-web-page/



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3