Change (Save as type) MyDoc.rtf to MyDoc.doc

Ultimate goal: Allow user to email an Access report that's password protected.

What I have so far:
I have the beginning and end, but missing the middle.

Doing this in VBA and can convert an Access report to an RTF which can be opened in Word.

I can add a Password to a Word.doc, but you can't use the password feature in Word with Word.rtf.

Is there a way to access the SAVE AS TYPE in code to save as a "Word Document (*.doc)"  ???

I'm new to this. Am I being clear enough with my question?

Thanks for any help anyone can provide!!!

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This is out of VBAWRD8.HLP.
As you can see, you can specify a FileName and a FileFormat. If the latter is wdFormatDocument, the document is saved in Word format.

-----------Paste starts here-------

Saves the specfied document with a new name or format. The arguments for this method correspond to the options in the Save As dialog box (File menu).


expression.SaveAs(FileName, FileFormat, LockComments, Password, AddToRecentFiles, WritePassword, ReadOnlyRecommended, EmbedTrueTypeFonts, SaveNativePictureFormat, SaveFormsData, SaveAsAOCELetter)

expression   Required. An expression that returns a Document object.

FileName   Optional Variant. The name for the document. The default is the current folder and file name. If the document has never been saved, the default name is used (for example, Doc1.doc). If a document with the specified FileName already exists, the document is overwritten without the user being prompted first.

FileFormat   Optional Variant. The format in which the document is saved. Can be one of the following WdSaveFormat constants: wdFormatDocument, wdFormatDOSText, wdFormatDOSTextLineBreaks, wdFormatRTF, wdFormatTemplate, wdFormatText, wdFormatTextLineBreaks, or wdFormatUnicodeText. To save a document in another format, specify the appropriate value for the SaveFormat property of the FileConverter object.

LockComments   Optional Variant. True to lock the document for comments.

Password   Optional Variant. A password string for opening the document.

AddToRecentFiles   Optional Variant. True to add the document to the list of recently used files on the File menu.

WritePassword   Optional Variant. A password string for saving changes to the document.

ReadOnlyRecommended   Optional Variant. True to have Word suggest read-only status whenever the document is opened.

EmbedTrueTypeFonts   Optional Variant. True to save TrueType fonts with the document.

SaveNativePictureFormat   Optional Variant. If graphics were imported from another platform (Macintosh), True to save only the Windows version of the imported graphics.

SaveFormsData   Optional Variant. True to save the data entered by a user in a form as a data record.

SaveAsAOCELetter   Optional Variant. If the document has an attached mailer, True to save the document as an AOCE letter (the mailer is saved).

-----End of Paste ---------


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kerryw60Author Commented:
Thanks Dabas!
kerryw60Author Commented:
Do I need to do anything to close this?
You already did, thanks for the points!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.