View Single Post
 
Old 01-31-2010, 02:47 AM
Steve_D Steve_D is offline Windows XP Office XP
Advanced Beginner
 
Join Date: Dec 2009
Posts: 59
Steve_D is on a distinguished road
Default

I'm only a basic macro user. I tried to record a suitable macro and came up with the code below, but it has a few problems:

Sub PersonA()
'
' PersonA Macro
'
'
ChangeFileOpenDirectory _
"F:\Documents and Settings\Steve\My Documents\Person A\"
ActiveDocument.SaveAs FileName:="Test.doc", FileFormat:=wdFormatDocument, _
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False
ActiveDocument.PrintOut
ActiveDocument.SendMail
End Sub

The first problem is that in doing the Save As, it specifies the file name. So this macro will save files to the Person A folder but only with the file name Test.doc. I don't know how you could get it to use the current document's name each time, but I'm sure there would be a way.

The second problem is that once you go to Send Email, you are outside MS Word, so you cannot record the recipient's email address and the Send command as part of the macro.

It may be a Visual Basic script that you need, assuming you use Outlook for email, which can operate across Word and Outlook.

Good luck!
Steve
Reply With Quote