Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-06-2014, 03:25 AM
macropod's Avatar
macropod macropod is offline How to invoke the macro correctly in the workflow Windows 7 32bit How to invoke the macro correctly in the workflow Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Re 1: That depends on what determines the required instant. As coded, the macro runs to completion when the document is created. Depending on what you want to do between opening and saving the document, it might be possible to solicit any required inputs via an InputBox, or two, for example, or by working with other dialogues. That way, the macro merely suspends processing while waiting for the required inputs.

Re 2: I don't see what the issue is. Since you're populating the title with the contents of the StrNm variable, there is no reason to not continue using it for whatever else it might be useful for. That said, if you're desperate to refer to the title property, you could use:
.Name = ActiveDocument.BuiltInDocumentProperties("Title")

Re: 3: The layout looks fine, though I'd be inclined to indent the .BuiltInDocumentProperties references so the nesting of the structure remains more apparent. The main point in using such visible structuring is for ease of maintenance. FWIW, though, VBA really doesn't care how the code looks - it's the logical structure that matters. Also, rather than creating and using 'DocSubject' for a once-off use, I'd be inclined to use:
.BuiltInDocumentProperties("Subject") = .Bookmarks("doctype").Range.Text
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to invoke the macro correctly in the workflow Suggestions wanted for improving workflow of shared incoming emails plaidma1 Outlook 1 05-03-2013 09:33 AM
How to add a file menu item and invoke an EXE? simplyarun PowerPoint 0 07-21-2011 01:59 AM
How to invoke the macro correctly in the workflow margins don't set correctly dawit Word 1 05-10-2011 09:47 PM
How to invoke the macro correctly in the workflow TOC Not Updating Correctly Nigel1985 Word 1 05-27-2010 07:19 PM
How to invoke the macro correctly in the workflow workflow silviu Office 1 05-21-2009 11:12 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:15 AM.


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