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
Documents(DocumentToEmail).Route
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