Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-31-2010, 02:47 AM
Steve_D Steve_D is offline Can I automate or make a macro for this? Windows XP Can I automate or make a macro for this? 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
 



Similar Threads
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
Can I automate or make a macro for this? Automate actions in MS Word 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

Other Forums: Access Forums

All times are GMT -7. The time now is 12:58 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft