Tech Support banner

Status
Not open for further replies.
1 - 2 of 2 Posts

·
Registered
Joined
·
1 Posts
Discussion Starter #1
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
 

·
Registered
Joined
·
35 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
Status
Not open for further replies.
Top