A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Saving Documents With Subject



 
 
Thread Tools Display Modes
  #1  
Old December 22nd, 2004, 03:30 PM
OHM \( Terry Burns \)
external usenet poster
 
Posts: n/a
Default Saving Documents With Subject

HI

There is probably a real easy solution to my question but here goes.

I want to save letters with the default name being the subject line of the
letter. When I say subject, Im not talking about the document information,
but the acutal line on the letter

Subject: This is the subject I want to use as the default filename

I want to prefix it with the initials of the current user so the document
should be saved something like

TB-This is the subject I want to use as the default filename


Any help would be appreciated

Many Thanks


  #2  
Old December 22nd, 2004, 03:42 PM
Suzanne S. Barnhill
external usenet poster
 
Posts: n/a
Default

The default filename that Word proposes is one of the following:

1. The first text in the document, up to the first punctuation mark or
line/paragraph break.

2. The text in the Title field of the document Properties. If the Title
field of the document template is not empty, the Title field of the template
will be propagated to the document.

Unless the subject line is the first (non-header) text in the document (1)
doesn't do you any good, but you can use (2) if your template includes a
UserForm to ask for the subject. This can then be written to the Title
property and automatically inserted in the document as the subject line via
a Title or DocProperty field in the template.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"OHM ( Terry Burns )" wrote in message
...
HI

There is probably a real easy solution to my question but here goes.

I want to save letters with the default name being the subject line of the
letter. When I say subject, Im not talking about the document information,
but the acutal line on the letter

Subject: This is the subject I want to use as the default filename

I want to prefix it with the initials of the current user so the document
should be saved something like

TB-This is the subject I want to use as the default filename


Any help would be appreciated

Many Thanks



  #3  
Old December 22nd, 2004, 06:10 PM
OHM \( Terry Burns \)
external usenet poster
 
Posts: n/a
Default

Thanks for your reply. I can fill the title field with this code.

Application.ActiveDocument.BuiltInDocumentProperti es(WdBuiltInProperty.wdPropertyTitle)
= _
Application.ActiveDocument.FormFields.Item(1).Resu lt

However, Im not sure how to keep the field from getting deleted. I dragged a
texbox to the subject line but two things elude me.

1.) How to Enter ( and hence run a macro ) the field

2.) How to Exit ( and do the same ) and stop the field getting deleted.



--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"Suzanne S. Barnhill" wrote in message
...
The default filename that Word proposes is one of the following:

1. The first text in the document, up to the first punctuation mark or
line/paragraph break.

2. The text in the Title field of the document Properties. If the Title
field of the document template is not empty, the Title field of the
template
will be propagated to the document.

Unless the subject line is the first (non-header) text in the document (1)
doesn't do you any good, but you can use (2) if your template includes a
UserForm to ask for the subject. This can then be written to the Title
property and automatically inserted in the document as the subject line
via
a Title or DocProperty field in the template.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.

"OHM ( Terry Burns )" wrote in message
...
HI

There is probably a real easy solution to my question but here goes.

I want to save letters with the default name being the subject line of
the
letter. When I say subject, Im not talking about the document
information,
but the acutal line on the letter

Subject: This is the subject I want to use as the default filename

I want to prefix it with the initials of the current user so the document
should be saved something like

TB-This is the subject I want to use as the default filename


Any help would be appreciated

Many Thanks





  #4  
Old December 22nd, 2004, 06:30 PM
OHM \( Terry Burns \)
external usenet poster
 
Posts: n/a
Default

Actually, I think ive worked this out. You have to protect the document.

One other question. IS there an way of filling in the field with a date when
created


--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"OHM ( Terry Burns )" wrote in message
...
Thanks for your reply. I can fill the title field with this code.

Application.ActiveDocument.BuiltInDocumentProperti es(WdBuiltInProperty.wdPropertyTitle)
= _
Application.ActiveDocument.FormFields.Item(1).Resu lt

However, Im not sure how to keep the field from getting deleted. I dragged
a texbox to the subject line but two things elude me.

1.) How to Enter ( and hence run a macro ) the field

2.) How to Exit ( and do the same ) and stop the field getting deleted.



--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"Suzanne S. Barnhill" wrote in message
...
The default filename that Word proposes is one of the following:

1. The first text in the document, up to the first punctuation mark or
line/paragraph break.

2. The text in the Title field of the document Properties. If the Title
field of the document template is not empty, the Title field of the
template
will be propagated to the document.

Unless the subject line is the first (non-header) text in the document
(1)
doesn't do you any good, but you can use (2) if your template includes a
UserForm to ask for the subject. This can then be written to the Title
property and automatically inserted in the document as the subject line
via
a Title or DocProperty field in the template.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.

"OHM ( Terry Burns )" wrote in message
...
HI

There is probably a real easy solution to my question but here goes.

I want to save letters with the default name being the subject line of
the
letter. When I say subject, Im not talking about the document
information,
but the acutal line on the letter

Subject: This is the subject I want to use as the default filename

I want to prefix it with the initials of the current user so the
document
should be saved something like

TB-This is the subject I want to use as the default filename


Any help would be appreciated

Many Thanks







  #5  
Old December 22nd, 2004, 07:13 PM
OHM \( Terry Burns \)
external usenet poster
 
Posts: n/a
Default

Solved that too

--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"OHM ( Terry Burns )" wrote in message
...
Actually, I think ive worked this out. You have to protect the document.

One other question. IS there an way of filling in the field with a date
when created


--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"OHM ( Terry Burns )" wrote in message
...
Thanks for your reply. I can fill the title field with this code.

Application.ActiveDocument.BuiltInDocumentProperti es(WdBuiltInProperty.wdPropertyTitle)
= _
Application.ActiveDocument.FormFields.Item(1).Resu lt

However, Im not sure how to keep the field from getting deleted. I
dragged a texbox to the subject line but two things elude me.

1.) How to Enter ( and hence run a macro ) the field

2.) How to Exit ( and do the same ) and stop the field getting deleted.



--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"Suzanne S. Barnhill" wrote in message
...
The default filename that Word proposes is one of the following:

1. The first text in the document, up to the first punctuation mark or
line/paragraph break.

2. The text in the Title field of the document Properties. If the Title
field of the document template is not empty, the Title field of the
template
will be propagated to the document.

Unless the subject line is the first (non-header) text in the document
(1)
doesn't do you any good, but you can use (2) if your template includes a
UserForm to ask for the subject. This can then be written to the Title
property and automatically inserted in the document as the subject line
via
a Title or DocProperty field in the template.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so
all may benefit.

"OHM ( Terry Burns )" wrote in message
...
HI

There is probably a real easy solution to my question but here goes.

I want to save letters with the default name being the subject line of
the
letter. When I say subject, Im not talking about the document
information,
but the acutal line on the letter

Subject: This is the subject I want to use as the default filename

I want to prefix it with the initials of the current user so the
document
should be saved something like

TB-This is the subject I want to use as the default filename


Any help would be appreciated

Many Thanks









 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving fonts with documents Mohammed Ismail General Discussion 1 October 6th, 2004 08:43 PM
Saving word documents Nelrios General Discussion 1 August 28th, 2004 09:46 PM
Word 03 - Saving documents Kathy Hansen General Discussion 2 August 27th, 2004 12:41 PM


All times are GMT +1. The time now is 10:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.