![]() |
#2
|
|||
|
|||
![]()
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 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Automate Data from Excel into Word DropDown...? | sigraves | Word VBA | 0 | 08-03-2009 06:54 AM |
Can I automate printing email attachments? | blackduck603 | Outlook | 0 | 04-01-2009 11:58 AM |
![]() |
Ray Vassallo | Word | 1 | 03-07-2009 09:22 AM |
Automate Word to Ask if you Want to Print | MrMims | Word VBA | 0 | 02-24-2009 06:21 PM |
Automate Excel tabname | deegz | Excel | 2 | 12-08-2008 02:57 AM |