Replies: 4   Views: 3288
Search bookmark from the template
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by swatir  · 20-09-2016 - 12:22

I want something like this,

$current_date = date("m/d/Y"); 

//get the bookmark and create a new MS Word Range (to enable text substitution) 
$bookmarkname = "TODAYDATE"; 
$objBookmark = $word->ActiveDocument->Bookmarks($bookmarkname); 
$range = $objBookmark->Range; 

//substitute the bookmark with actual value 
$range->Text = $current_date;