Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Mumbly_Joe Mumbly_Joe is offline
external usenet poster
 
Posts: 2
Default Altering the Doc properties from inside a document

So my question might be a little convoluted but here goes nothing.

I'm trying to create a template that has some kind of textbox that changes
the document property (specifically "category") to what ever has been typed
in the box.

I'm not really certain where to begin
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Mumbly_Joe[_2_] Mumbly_Joe[_2_] is offline
external usenet poster
 
Posts: 4
Default Altering the Doc properties from inside a document

Ok, Maybe a better way to phrase this question is that I'm looking ot creat
some sort of textbox, field cell ect... that runs a macro when ever text is
typed in it (A ma cro that will in this case change a doc property)

"Mumbly_Joe" wrote:

So my question might be a little convoluted but here goes nothing.

I'm trying to create a template that has some kind of textbox that changes
the document property (specifically "category") to what ever has been typed
in the box.

I'm not really certain where to begin

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Mumbly_Joe[_2_] Mumbly_Joe[_2_] is offline
external usenet poster
 
Posts: 4
Default Altering the Doc properties from inside a document


Ok, Maybe a better way to phrase this question is that I'm looking ot creat
some sort of textbox, field cell ect... that runs a macro when ever text is
typed in it (A ma cro that will in this case change a doc property)

"Mumbly_Joe" wrote:

So my question might be a little convoluted but here goes nothing.

I'm trying to create a template that has some kind of textbox that changes
the document property (specifically "category") to what ever has been typed
in the box.

I'm not really certain where to begin

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Altering the Doc properties from inside a document

If you add the following autonew macro to your document, it will prompt on
creating a new document and write what you enter in the box to the Category
document property then update any fields in the document. If you are using a
docproperty field elsewhere than in the main text area, you may need a more
robust update routine to catch it - see
http://www.gmayor.com/installing_macro.htm

Sub AutoNew()
Dim sCat As String
sCat = InputBox("Enter category", "Category")
ActiveDocument.BuiltInDocumentProperties("Category ").Value = sCat
ActiveDocument.Fields.Update
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Mumbly_Joe" wrote in message
...
So my question might be a little convoluted but here goes nothing.

I'm trying to create a template that has some kind of textbox that changes
the document property (specifically "category") to what ever has been
typed
in the box.

I'm not really certain where to begin



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Altering the Doc properties from inside a document


If you add the following autonew macro to your document, it will prompt on
creating a new document and write what you enter in the box to the Category
document property then update any fields in the document. If you are using a
docproperty field elsewhere than in the main text area, you may need a more
robust update routine to catch it - see
http://www.gmayor.com/installing_macro.htm

Sub AutoNew()
Dim sCat As String
sCat = InputBox("Enter category", "Category")
ActiveDocument.BuiltInDocumentProperties("Category ").Value = sCat
ActiveDocument.Fields.Update
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Mumbly_Joe" wrote in message
...
So my question might be a little convoluted but here goes nothing.

I'm trying to create a template that has some kind of textbox that changes
the document property (specifically "category") to what ever has been
typed
in the box.

I'm not really certain where to begin





  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Altering the Doc properties from inside a document

The simple expedient of typing text into some form of field is not going to
be sufficient to trigger the macro. You could run it on exit from a
protected form field or a Word 2007 content control - even a table cell, but
you have to take some specific action to trigger the macro that is more than
simply typing.

If the macro I suggested earlier is unsuitable, then let us know the purpose
of the exercise. There may be a better solution.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Mumbly_Joe" wrote in message
...

Ok, Maybe a better way to phrase this question is that I'm looking ot
creat
some sort of textbox, field cell ect... that runs a macro when ever text
is
typed in it (A ma cro that will in this case change a doc property)

"Mumbly_Joe" wrote:

So my question might be a little convoluted but here goes nothing.

I'm trying to create a template that has some kind of textbox that
changes
the document property (specifically "category") to what ever has been
typed
in the box.

I'm not really certain where to begin



  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Altering the Doc properties from inside a document

The simple expedient of typing text into some form of field is not going to
be sufficient to trigger the macro. You could run it on exit from a
protected form field or a Word 2007 content control - even a table cell, but
you have to take some specific action to trigger the macro that is more than
simply typing.

If the macro I suggested earlier is unsuitable, then let us know the purpose
of the exercise. There may be a better solution.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Mumbly_Joe" wrote in message
...

Ok, Maybe a better way to phrase this question is that I'm looking ot
creat
some sort of textbox, field cell ect... that runs a macro when ever text
is
typed in it (A ma cro that will in this case change a doc property)

"Mumbly_Joe" wrote:

So my question might be a little convoluted but here goes nothing.

I'm trying to create a template that has some kind of textbox that
changes
the document property (specifically "category") to what ever has been
typed
in the box.

I'm not really certain where to begin



  #8   Report Post  
Posted to microsoft.public.word.docmanagement
Mumbly_Joe[_2_] Mumbly_Joe[_2_] is offline
external usenet poster
 
Posts: 4
Default Altering the Doc properties from inside a document

Thanks, that's really helpful, but I have a bit of a follow up question to
ask now.

I'm putting together this template for some co-workers and the the feedback
I've gotten is that that they want an easy way to change it at a later time.
So let's say that it starts out as a "Blue" and then later down the line they
need to change to a "Red". Now let's pretend it's difficult to modify a doc
category manually, is there an easy way to make like a dutton on the doc that
runs the maco again?

"Graham Mayor" wrote:

If you add the following autonew macro to your document, it will prompt on
creating a new document and write what you enter in the box to the Category
document property then update any fields in the document. If you are using a
docproperty field elsewhere than in the main text area, you may need a more
robust update routine to catch it - see
http://www.gmayor.com/installing_macro.htm

Sub AutoNew()
Dim sCat As String
sCat = InputBox("Enter category", "Category")
ActiveDocument.BuiltInDocumentProperties("Category ").Value = sCat
ActiveDocument.Fields.Update
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Mumbly_Joe" wrote in message
...
So my question might be a little convoluted but here goes nothing.

I'm trying to create a template that has some kind of textbox that changes
the document property (specifically "category") to what ever has been
typed
in the box.

I'm not really certain where to begin



.

  #9   Report Post  
Posted to microsoft.public.word.docmanagement
Mumbly_Joe[_2_] Mumbly_Joe[_2_] is offline
external usenet poster
 
Posts: 4
Default Altering the Doc properties from inside a document

Thanks, that's really helpful, but I have a bit of a follow up question to
ask now.

I'm putting together this template for some co-workers and the the feedback
I've gotten is that that they want an easy way to change it at a later time.
So let's say that it starts out as a "Blue" and then later down the line they
need to change to a "Red". Now let's pretend it's difficult to modify a doc
category manually, is there an easy way to make like a dutton on the doc that
runs the maco again?

"Graham Mayor" wrote:

If you add the following autonew macro to your document, it will prompt on
creating a new document and write what you enter in the box to the Category
document property then update any fields in the document. If you are using a
docproperty field elsewhere than in the main text area, you may need a more
robust update routine to catch it - see
http://www.gmayor.com/installing_macro.htm

Sub AutoNew()
Dim sCat As String
sCat = InputBox("Enter category", "Category")
ActiveDocument.BuiltInDocumentProperties("Category ").Value = sCat
ActiveDocument.Fields.Update
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Mumbly_Joe" wrote in message
...
So my question might be a little convoluted but here goes nothing.

I'm trying to create a template that has some kind of textbox that changes
the document property (specifically "category") to what ever has been
typed
in the box.

I'm not really certain where to begin



.

  #10   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Altering the Doc properties from inside a document

Yes - just run the macro again - see how to add a macro to a button at
http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Mumbly_Joe" wrote in message
...
Thanks, that's really helpful, but I have a bit of a follow up question to
ask now.

I'm putting together this template for some co-workers and the the
feedback
I've gotten is that that they want an easy way to change it at a later
time.
So let's say that it starts out as a "Blue" and then later down the line
they
need to change to a "Red". Now let's pretend it's difficult to modify a
doc
category manually, is there an easy way to make like a dutton on the doc
that
runs the maco again?

"Graham Mayor" wrote:

If you add the following autonew macro to your document, it will prompt
on
creating a new document and write what you enter in the box to the
Category
document property then update any fields in the document. If you are
using a
docproperty field elsewhere than in the main text area, you may need a
more
robust update routine to catch it - see
http://www.gmayor.com/installing_macro.htm

Sub AutoNew()
Dim sCat As String
sCat = InputBox("Enter category", "Category")
ActiveDocument.BuiltInDocumentProperties("Category ").Value = sCat
ActiveDocument.Fields.Update
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Mumbly_Joe" wrote in message
...
So my question might be a little convoluted but here goes nothing.

I'm trying to create a template that has some kind of textbox that
changes
the document property (specifically "category") to what ever has been
typed
in the box.

I'm not really certain where to begin



.





  #11   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Altering the Doc properties from inside a document

Yes - just run the macro again - see how to add a macro to a button at
http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Mumbly_Joe" wrote in message
...
Thanks, that's really helpful, but I have a bit of a follow up question to
ask now.

I'm putting together this template for some co-workers and the the
feedback
I've gotten is that that they want an easy way to change it at a later
time.
So let's say that it starts out as a "Blue" and then later down the line
they
need to change to a "Red". Now let's pretend it's difficult to modify a
doc
category manually, is there an easy way to make like a dutton on the doc
that
runs the maco again?

"Graham Mayor" wrote:

If you add the following autonew macro to your document, it will prompt
on
creating a new document and write what you enter in the box to the
Category
document property then update any fields in the document. If you are
using a
docproperty field elsewhere than in the main text area, you may need a
more
robust update routine to catch it - see
http://www.gmayor.com/installing_macro.htm

Sub AutoNew()
Dim sCat As String
sCat = InputBox("Enter category", "Category")
ActiveDocument.BuiltInDocumentProperties("Category ").Value = sCat
ActiveDocument.Fields.Update
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Mumbly_Joe" wrote in message
...
So my question might be a little convoluted but here goes nothing.

I'm trying to create a template that has some kind of textbox that
changes
the document property (specifically "category") to what ever has been
typed
in the box.

I'm not really certain where to begin



.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Move a page within a document without altering rest of data? tjsmags Microsoft Word Help 3 September 18th 08 07:36 PM
Advanced Document Properties to Standard Properties Window? TychaBrahe Microsoft Word Help 1 April 3rd 08 12:25 AM
I need to edit the document properties after properties creation. Jed Microsoft Word Help 3 October 7th 07 12:17 AM
Prevent from altering tikchye_oldLearner57 Microsoft Word Help 1 August 6th 06 04:39 AM
altering details Boots Mailmerge 6 June 15th 06 10:42 AM


All times are GMT +1. The time now is 11:37 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"