Article View: microsoft.public.word.vba
Article #1Help please: macro to save various html as rtf
From: comicnut
Date: Wed, 30 Aug 2023 17:14
Date: Wed, 30 Aug 2023 17:14
28 lines
1645 bytes
1645 bytes
I'm converting a number of htmls with different filenames to rtf after
using other macros to reformat.
I recorded a macro of saving an html file as rtf. Looking at the macro
in vba, it specifies saving the file as a specific filename to a
specific directory which would overwrite other files. I want to alter
this macro to automatically save the filename and directory as the
current active document
Any ideas?
Here's the recorded macro:
Sub savertf1()
'
' savertf1 Macro
'
'
ChangeFileOpenDirectory "D:\New folder\"
ActiveDocument.SaveAs2 FileName:="test123.rtf",
FileFormat:=wdFormatRTF, _
LockComments:=False, Password:="", AddToRecentFiles:=True,
WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False,
SaveAsAOCELetter:= _
False, CompatibilityMode:=0
End Sub
Technical Details
Message-ID:
<o4uueit2naaile0oc3j476o8v1sk25j4ec@4ax.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf2.newsdeef.eu!news.usenet.farm!..!..!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <o4uueit2naaile0oc3j476o8v1sk25j4ec@4ax.com> Subject: Help please: macro to save various html as rtf Date: Wed, 30 Aug 2023 13:14:32 -0400 From: comicnut@fuse.net Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf2.newsdeef.eu!news.usenet.farm!..!..!not-for-mail Newsgroups: microsoft.public.word.vba X-Newsreader: Forte Agent 4.2/32.1118 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 28 X-Complaints-To: http://www.newsleecher.com/support/ NNTP-Posting-Date: Wed, 30 Aug 2023 17:14:35 UTC X-Received-Bytes: 1436