Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-30-2010, 07:44 PM
mkoenig mkoenig is offline Can I automate or make a macro for this? Windows XP Can I automate or make a macro for this? Office 2007
Novice
Can I automate or make a macro for this?
 
Join Date: Jan 2010
Posts: 1
mkoenig is on a distinguished road
Default Can I automate or make a macro for this?

Can some one help me automate a process or write a macro to do multiple steps that I repeat several times a day in Microsoft Word? I receive reports (Word docs) that I edit and save and then forward by email to the final recipient. There are about 6 different recipients that may receive these. Here are the steps I do every time after I have finished reviewing/editing the report:
1."Save As". I save it with the default name it had when it was sent to me but I need to save it to separate folder, depending on which final recipient I will be sending it to.
2. "Quick Print". I print out a copy to archive also.
3. "Send to Email Recipient"

I have no experience with macros. I read a little about them and watched a few MS tutorial videos. However, my initial attempts weren't successful. Ideally, once I am done with the document, I would click on one icon that would do the above steps. Specifically, if that document is going the Recipient A, I select the "Send to A" button/icon and it saves it to "Reports for A" folder (maintaining the original file name), prints it, and then emails it to A. If it is for recipient B, I click on icon "Send to B".......etc.

I am using Word 2007 (Office Professional 2007) with Windows XP.

Thank you very much,



Marc
Reply With Quote
  #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
Reply

Thread Tools
Display Modes


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 07:28 AM.


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