Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 02-05-2013, 06:43 AM
macropod's Avatar
macropod macropod is offline Adding field in word in header in a bookmark in table with Excel vba Late Binding Windows 7 64bit Adding field in word in header in a bookmark in table with Excel vba Late Binding 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

Quote:
the template i can not change, therefor I have to add the reference to (in this case) the date on the second page.
That suggests you really don't understand what you're doing. Your code uses:
Set objDoc = .Documents.Add 'If no template
which indicates you're using Word's Normal template instead of a specific template for this project. Were you to create a template for this project, and use:
Set objDoc = .Documents.Add(Template:="Filepath\Filename.dotx")
where 'Filepath\Filename.dotx' represents the template's path and name, your code could be much simpler.

I also don't see any indication you've actually tried the code I posted or that you've paid any attention to my request in your other thread that you use code tags when posting code. I also reiterate my previous advice that you don't need to seek the header or select anything.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding field in word in header in a bookmark in table with Excel vba Late Binding Open header to insert text into bookmark Amapola188 Word VBA 3 07-12-2012 05:16 PM
Excel Pivot Table Calculated Field BertLady Excel 0 05-21-2012 10:51 AM
Late Binding on SHDocVw tinfanide Excel Programming 1 05-19-2012 10:00 PM
Adding field in word in header in a bookmark in table with Excel vba Late Binding Putting a bookmark on a REF field in the selection b0x4it Word VBA 4 05-26-2011 01:14 AM
Adding field in word in header in a bookmark in table with Excel vba Late Binding Highlight and put bookmark on the closest field to the cursor b0x4it Word VBA 11 05-19-2011 11:15 PM

Other Forums: Access Forums

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