Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-04-2016, 07:28 PM
macropod's Avatar
macropod macropod is offline Editing the text a formula gets me Windows 7 64bit Editing the text a formula gets me Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,520
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:
Originally Posted by Jiing Chiang View Post
I am trying to template specific text to be used in a Word document.
So why not do the lot in Word using, for example, formfields and field coding or content controls and macros?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 02-04-2016, 10:28 PM
Jiing Chiang Jiing Chiang is offline Editing the text a formula gets me Windows 10 Editing the text a formula gets me Office 2016
Novice
Editing the text a formula gets me
 
Join Date: Jan 2016
Location: Australia
Posts: 11
Jiing Chiang is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
So why not do the lot in Word using, for example, formfields and field coding or content controls and macros?
Hi macropd, the reason it has to be done in excel first is because I require another team to fill in the variables for me. The spreadsheet itself is used to satisfy all necessary legal requirements we need to adhere to.

So far i've just got a cell off to the far right with the VLOOKUP stuff in it, where the template text will be held.

I was thinking a copy and paste special macro assigned to a button would work to copy the contents of the cell, and paste special (values) into a text box, which will allow the text to then be edited.

I tried to 'record a macro', but all it did was include the actual templated text within the macro, which means even if the variables are changed, the text won't.

After trying to watch some youtube videos and more googling, I've got this so far... I can get the Copy to work correctly, just don't know how to refer to the textbox...
I recorded a new macro and selected the text box, then typed random words into it just so i could try to figure out the code on how to refer to the textbox, but I seem to be stuck.
Reply With Quote
  #3  
Old 02-04-2016, 11:42 PM
macropod's Avatar
macropod macropod is offline Editing the text a formula gets me Windows 7 64bit Editing the text a formula gets me Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,520
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:
Originally Posted by Jiing Chiang View Post
Hi macropd, the reason it has to be done in excel first is because I require another team to fill in the variables for me.
of itself, that doesn't mean you need to involve Excel - it could still all be done in Word.

That said, your users could type their supplemental info into column D on sheet1. The Data sheet could then use formulae like:
="You should wake up tomorrow morning at "&Sheet1!D2&"am."
="You should eat "&Sheet1!D2&" for breakfast tomorrow."
etc.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 02-08-2016, 08:39 PM
Jiing Chiang Jiing Chiang is offline Editing the text a formula gets me Windows 10 Editing the text a formula gets me Office 2016
Novice
Editing the text a formula gets me
 
Join Date: Jan 2016
Location: Australia
Posts: 11
Jiing Chiang is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
of itself, that doesn't mean you need to involve Excel - it could still all be done in Word.

That said, your users could type their supplemental info into column D on sheet1. The Data sheet could then use formulae like:
="You should wake up tomorrow morning at "&Sheet1!D2&"am."
="You should eat "&Sheet1!D2&" for breakfast tomorrow."
etc.
Hi macropd, appreciate yours and others' input so far.

I've figured out a way to resolve my issues. For anyone else that has looking for a solution to a similar problem, I simply output the text in 'hidden' cells (by that I mean i've just made the text output to cell AC2, AC3 etc). I then inserted an ActiveX button with the following macro:

Sub fillstrategy()
'
' fillstrategy Macro
Sheets("PP").TextBoxes("TextBox 12").Text = Sheets("PP").Range("AC2").Value
Sheets("PP").TextBoxes("TextBox 13").Text = Sheets("PP").Range("AC3").Value
Sheets("PP").TextBoxes("TextBox 14").Text = Sheets("PP").Range("AC4").Value

End Sub

This way the relevant text from the items selected in the drop down menu are auto-filled into the text boxes.

The users then read through the templated text, and update the areas that i've marked with ##XXXXXXXX##.

Just one last question: Is there any way to highlight the ##XXXXX## sections of the templated text? I've highlighted the sections in red in the 'raw data', but when the text pulls through from the INDEX formula, it comes through all black, without the ##XXXX## sections highlighted in red.

And we require the use of excel as our client's data is automatically fed into excel which then auto-populates relevant sections. Appropriate financial calculations are then performed using that data. The outcome of this background research/calculations are then outputted to a templated word document.
Reply With Quote
  #5  
Old 02-08-2016, 10:01 PM
macropod's Avatar
macropod macropod is offline Editing the text a formula gets me Windows 7 64bit Editing the text a formula gets me Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,520
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:
Originally Posted by Jiing Chiang View Post
Just one last question: Is there any way to highlight the ##XXXXX## sections of the templated text? I've highlighted the sections in red in the 'raw data', but when the text pulls through from the INDEX formula, it comes through all black, without the ##XXXX## sections highlighted in red.
Excel formulae cannot capture and output font attributes; only the raw text/values.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
formatting consistency drofla Word 2 06-03-2015 10:53 PM
Editing the text a formula gets me editing content for visual consistency eNGiNe PowerPoint 3 03-31-2015 12:31 PM
Editing the text a formula gets me Maintaining Consistency across multiple documents Yann Word 1 04-19-2012 08:07 PM
Vertical lines nigo75 Project 3 09-13-2011 04:03 AM
Vertical climberman Word 2 12-29-2009 09:53 AM

Other Forums: Access Forums

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