Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
M.L. M.L. is offline
external usenet poster
 
Posts: 5
Default How do I output Word 2003 merge as HTML?

Hi. I'm just learning how to use Word 2003 mail merge to create
HTML templates for my website. The only problem is that the
resulting pages are output as .doc files instead of .html. Is there
a way I can set mail merge options to output my result as HTML
files instead? Thanks.


  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How do I output Word 2003 merge as HTML?

Look at the variety of file types you can save a document as from the File
Save As dialog!

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


M.L. wrote:
Hi. I'm just learning how to use Word 2003 mail merge to create
HTML templates for my website. The only problem is that the
resulting pages are output as .doc files instead of .html. Is there
a way I can set mail merge options to output my result as HTML
files instead? Thanks.



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
M.L. M.L. is offline
external usenet poster
 
Posts: 5
Default How do I output Word 2003 merge as HTML?

Hi. I'm just learning how to use Word 2003 mail merge to create
HTML templates for my website. The only problem is that the
resulting pages are output as .doc files instead of .html. Is there
a way I can set mail merge options to output my result as HTML
files instead? Thanks.


Look at the variety of file types you can save a document as from the
File Save As dialog!


Thanks for your reply. However, the Word 2000 mailmerge does not
offer a Save As dialog box when it gets ready to merge the document.
The results are automatically saved as .doc files.


  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How do I output Word 2003 merge as HTML?

Oops - sorry, I hadn't had my breakfast when I wrote that. I was forgetting
which group I was in.

You could output to a new document and use the splitter macro from
http://www.gmayor.com/individual_merge_letters.htm to break to individual
documents saved as html.

Change the fileformat in the line
ActiveDocument.SaveAs FileName:=DocName, FileFormat:=wdFormatDocument
to
wdFormatHTML
and the extension in the line
DocName = "D:\My Documents\Temp\Workgroup\" & Format(Date, mask) _
& " " & LTrim$(Str$(Counter)) & ".doc"
from doc to htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


M.L. wrote:
Hi. I'm just learning how to use Word 2003 mail merge to create
HTML templates for my website. The only problem is that the
resulting pages are output as .doc files instead of .html. Is there
a way I can set mail merge options to output my result as HTML
files instead? Thanks.


Look at the variety of file types you can save a document as from the
File Save As dialog!


Thanks for your reply. However, the Word 2000 mailmerge does not
offer a Save As dialog box when it gets ready to merge the document.
The results are automatically saved as .doc files.



  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
M.L. M.L. is offline
external usenet poster
 
Posts: 5
Default How do I output Word 2003 merge as HTML?

Hi. I'm just learning how to use Word 2003 mail merge to create
HTML templates for my website. The only problem is that the
resulting pages are output as .doc files instead of .html. Is there
a way I can set mail merge options to output my result as HTML
files instead? Thanks.


Look at the variety of file types you can save a document as from
the
File Save As dialog!


Thanks for your reply. However, the Word 2000 mailmerge does not
offer a Save As dialog box when it gets ready to merge the document.
The results are automatically saved as .doc files.


Oops - sorry, I hadn't had my breakfast when I wrote that. I was
forgetting which group I was in.

You could output to a new document and use the splitter macro from
http://www.gmayor.com/individual_merge_letters.htm to break to
individual documents saved as html.

Change the fileformat in the line
ActiveDocument.SaveAs FileName:=DocName, FileFormat:=wdFormatDocument
to
wdFormatHTML
and the extension in the line
DocName = "D:\My Documents\Temp\Workgroup\" & Format(Date, mask) _
& " " & LTrim$(Str$(Counter)) & ".doc"
from doc to htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



I don't know much about scripting and expected something
simpler. But if I have to I'll give it a try. Thanks again.




  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
M.L. M.L. is offline
external usenet poster
 
Posts: 5
Default How do I output Word 2003 merge as HTML?

Hi. I'm just learning how to use Word 2003 mail merge to create
HTML templates for my website. The only problem is that the
resulting pages are output as .doc files instead of .html. Is there
a way I can set mail merge options to output my result as HTML
files instead? Thanks.

Look at the variety of file types you can save a document as from the
File Save As dialog!

Thanks for your reply. However, the Word 2000 mailmerge does not
offer a Save As dialog box when it gets ready to merge the document.
The results are automatically saved as .doc files.


Oops - sorry, I hadn't had my breakfast when I wrote that. I was
forgetting which group I was in.

You could output to a new document and use the splitter macro from
http://www.gmayor.com/individual_merge_letters.htm to break to individual
documents saved as html.

Change the fileformat in the line
ActiveDocument.SaveAs FileName:=DocName, FileFormat:=wdFormatDocument
to
wdFormatHTML
and the extension in the line
DocName = "D:\My Documents\Temp\Workgroup\" & Format(Date, mask) _
& " " & LTrim$(Str$(Counter)) & ".doc"
from doc to htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



I don't know much about scripting and expected something
simpler. But if I have to I'll give it a try. Thanks again.


While trying to solve my mailmerge conversion issue I Googled upon
a May 7, 2004 post of yours which explained this issue in more detail.
Specifically, you wrote the following macro to convert doc files to HTML:
*******************************
Public Sub BatchSaveAsHTML()
Dim myFile As String
Dim myHTML As String
Dim myLen As String
Dim myLen2 As String
Dim PathToUse As String
Dim myDoc As Document

With Dialogs(wdDialogCopyFile)
If .Display 0 Then
PathToUse = .Directory
Else
MsgBox "Cancelled by User"
Exit Sub
End If
End With

If Documents.Count 0 Then
Documents.Close Savechanges:=wdPromptToSaveChanges
End If

If Left(PathToUse, 1) = Chr(34) Then
PathToUse = Mid(PathToUse, 2, Len(PathToUse) - 2)
End If

myFile = Dir$(PathToUse & "*.doc")

While myFile ""
Set myDoc = Documents.Open(PathToUse & myFile)
myLen = Len(myFile)
myLen2 = myLen - 3
myHTML = Left(myFile, myLen2) & "HTML"
myDoc.SaveAs FileName:=myHTML, FileFormat:=wdFormatHTML
myDoc.Close Savechanges:=wdSaveChanges
myFile = Dir$()
Wend
End Sub
*********************************************

I notice that your reply contains some slight changes from the earlier
version.
I installed your macro and it worked well, and was faster than I thought
it would be. However, I do have some questions:

1.) The output HTML files were saved to the "my documents folder." Is there
a way I can set the output files to the folder of my choice? Or could I at
least set the
output to be saved in the same folder from which I loaded my original doc
files?

2.) The HTML is not filtered and therefore I get some extra data in the HTML
source. Is there a way I can clean up the HTML during the macro?

3.) Does it matter that the Word default macro template does not contain
the word "Public" preceeding the word sub?

In addition, when I went to your website I downloaded the macro that splits
the
merged file into separate files (MMtoDocsRev19.dot). Your tutorial on that
macro
showed some familiar screenshots. I realized that your macro was already on
my
Word 2003 system, even though I don't remember ever having placed it there.
It is located in my Applications Data\Microsoft\Word startup folder
as MailMergetoDocsRev19.dot. Are the two files equivalent?

I'd like to again thank you so much for all your assistance in this matter.


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting WordPerfect 12 files to Word 2003 Curious New Users 4 May 19th 23 02:48 PM
How to put graphics on envelopes? Steve Koenig Microsoft Word Help 21 April 29th 23 02:47 AM
take yet another lesson from wordperfect "reveal codes" wordperfect is superior Microsoft Word Help 5 May 11th 09 07:58 PM
Change paper size; Word changes to invalid margins OhioTech New Users 10 July 6th 06 02:00 PM
After merge I need to see the letters under the prompt box to edit CheyWyShyGirl Mailmerge 1 June 23rd 06 10:58 PM


All times are GMT +1. The time now is 08:02 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"