Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 02-07-2013, 01:45 PM
macropod's Avatar
macropod macropod is offline Using programming with Word Templates Windows 7 64bit Using programming with Word Templates Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
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

You have numerous options for programmatic editing, none of which is necessarily 'the best', including:
• editing Word's built-in document properties, combined with DOCPROPERTY fields in the document;
• creating/editing custom document properties, combined with DOCPROPERTY fields in the document;
• using bookmarks, also possibly combined with cross-reference fields;
• using tables, formfields or content controls (the latter are usable only in Word 2007 & later) as placeholders;
• using embedded objects (eg Excel workbooks) or linking to external objects (eg Excel workbooks, other documents, etc).
• using custom Quick Parts that can be used to add whole pages/sections of content, if need be, as/when required.

It's not really a question of working with vba, but with the Word object model. All of that model's properties, procedures and methods are, of course, exposed to vba. If you're working in C#, it them becomes a matter of learning how to automate Word and call the Word object model to do whatever you need.

PS: There are many C# code snippets for Office automation at the MSDN library:
http://msdn.microsoft.com/en-US/
http://msdn.microsoft.com/en-us/libr...bd(VS.80).aspx
http://msdn.microsoft.com/en-us/library/ee342218.aspx
http://code.msdn.microsoft.com/
http://support.microsoft.com/kb/316384
http://support.microsoft.com/kb/302084
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Book Page Format Sample SQLUSA Word 12 08-03-2012 02:15 AM
Outlook programming waldux Outlook 0 01-10-2012 12:47 PM
Content Controls Form Programming beachdog Word VBA 4 09-20-2011 10:26 AM
outlook programming add Junk e-mail option to menu bar chriskaza81 Outlook 0 11-25-2010 03:58 AM
Programming based on an enter key event edayers315 Word VBA 0 06-11-2010 09:57 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:20 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