Tech Support Forum banner

email closed textfile from Word 2002

752 Views 1 Reply 2 Participants Last post by  snub
Hi. I want Word to email a text file. I tried RoutingSlip - this only works if the file is open - I could live with that, but when the file arrives at the recipient's inbox, it's renamed to filename.doc rather than filename.txt.

This is the code I used:

ChangeFileOpenDirectory "C:\OmniScribe\Admin\"
Documents.Open FileName:="WorkLog.txt", ConfirmConversions:=False
DocumentToEmail = "WorkLog.txt"
Documents(DocumentToEmail).HasRoutingSlip = True
With Documents(DocumentToEmail).RoutingSlip
.Subject = DocumentToEmail
.AddRecipient Recipient:="[email protected]"
.Delivery = wdAllAtOnce
End With

You can see that the code doesn't save the text file once it's opened it, so I don't see why Word would convert it during the emailing process.

Ideally, does anyone know code to email the text file without opening it? Alternatively, is there any way to stop Word from renaming the file in the process?

I use Outlook Express but can only guarantee that the users of the code will have Word 2000+ and some sort of email.

Thank you, thank you in advance - Cath
Not open for further replies.
1 - 2 of 2 Posts
Where is the text file?

Where is the text file saved? If it's in My Documents you can open that folder and Right click on the closed file you want to send and then click Send To. This should open your default email program with the file as an attachment.
1 - 2 of 2 Posts
Not open for further replies.