Quick Part

When i add a new custom field E.g  {DOCPROPERTY  "Transaction Comments" }to 
my document (Type: Text) there is a restriction to 255 characters. 
Is there any way to increase this? Or is this a M/S word restriction that 
cannot be changed?
0
Utf
1/26/2010 2:51:01 PM
word.docmanagement 5542 articles. 2 followers. Follow

2 Replies
1314 Views

Similar Articles

[PageSpeed] 51

Catherine wrote:
> When i add a new custom field E.g  {DOCPROPERTY  "Transaction
> Comments" }to my document (Type: Text) there is a restriction to 255
> characters.
> Is there any way to increase this? Or is this a M/S word restriction
> that cannot be changed?

It is a restriction that can't be changed. I didn't find any official 
documentation of this, but the result of the following macro makes it clear 
that Word truncates the input to 255 characters:

Sub x()
    Dim mystr As String
    Dim myCP As DocumentProperty
    mystr = String(260, "A")
    ActiveDocument.CustomDocumentProperties.Add _
        Name:="test1", LinkToContent:=False, _
        Type:=msoPropertyTypeString, _
        Value:=mystr

    MsgBox Len(ActiveDocument.CustomDocumentProperties("test1").Value)
End Sub

However, there is no such restriction on document *variables*, as the result 
of this similar macro shows:

Sub y()
    Dim mystr As String
    Dim myVar As Variable
    mystr = String(500, "A")
    ActiveDocument.Variables.Add _
        Name:="test1", Value:=mystr

    MsgBox Len(ActiveDocument.Variables("test1").Value)
End Sub

In the document, you can display the value of the variable with a field 
{DOCVARIABLE test1}.

The two main differences between custom document properties and document 
variables are (a) all document variables are strings, and (b) there is no 
dialog for setting document variables, so they must be set through a 
macro -- this may be a drawback or a benefit, depending on whether you want 
to allow users to change the value.

-- 
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so 
all may benefit. 


0
Jay
1/26/2010 4:18:53 PM
Jay,

Many thanks for your prompt help.

Catherine

"Jay Freedman" wrote:

> Catherine wrote:
> > When i add a new custom field E.g  {DOCPROPERTY  "Transaction
> > Comments" }to my document (Type: Text) there is a restriction to 255
> > characters.
> > Is there any way to increase this? Or is this a M/S word restriction
> > that cannot be changed?
> 
> It is a restriction that can't be changed. I didn't find any official 
> documentation of this, but the result of the following macro makes it clear 
> that Word truncates the input to 255 characters:
> 
> Sub x()
>     Dim mystr As String
>     Dim myCP As DocumentProperty
>     mystr = String(260, "A")
>     ActiveDocument.CustomDocumentProperties.Add _
>         Name:="test1", LinkToContent:=False, _
>         Type:=msoPropertyTypeString, _
>         Value:=mystr
> 
>     MsgBox Len(ActiveDocument.CustomDocumentProperties("test1").Value)
> End Sub
> 
> However, there is no such restriction on document *variables*, as the result 
> of this similar macro shows:
> 
> Sub y()
>     Dim mystr As String
>     Dim myVar As Variable
>     mystr = String(500, "A")
>     ActiveDocument.Variables.Add _
>         Name:="test1", Value:=mystr
> 
>     MsgBox Len(ActiveDocument.Variables("test1").Value)
> End Sub
> 
> In the document, you can display the value of the variable with a field 
> {DOCVARIABLE test1}.
> 
> The two main differences between custom document properties and document 
> variables are (a) all document variables are strings, and (b) there is no 
> dialog for setting document variables, so they must be set through a 
> macro -- this may be a drawback or a benefit, depending on whether you want 
> to allow users to change the value.
> 
> -- 
> Regards,
> Jay Freedman
> Microsoft Word MVP        FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the newsgroup so 
> all may benefit. 
> 
> 
> .
> 
0
Utf
1/26/2010 5:36:02 PM
Reply:

Similar Artilces:

$500 A Day
$500 A Day - Your Work From Your Home Part Time! -Your job will consist mostly of sending and receiving emails. You will also be filling in short forms on the internet. For every email that is successfully processed you will earn $15 to $25 depending on the email. http://tinyurl.com/dhwqvt ...

Copying certain column information quickly
As you know in Excel you could quickly copy the information you needed with a drag of the mouse. Because I need information copied repeatedly and easily for my access unfirmiliar co workers. Example JOB CUSTOMER QUOTE # A B1 110701 A(copied) A2 110701 (copied) A(copied) C4 110701 (copied) How do I do this quickly and efficiently for the computer challenged. Sorry, Access is a database, not a spreadsheet, and can't be used like one. You can write some code to select the rows that you want to ...

Quick help with excel formula
Ok, i need a forumla. this is what I want, i have two columns like this Time Start: ............. Time Finish: ............ I fill out these two columns like this Time Start: ...17:42... Time Finish: ...18:25.. Now i have another Column that says Training Length: ........ I want this to work out the time between 17:42 and 18:25 Any one help pleas -- Message posted from http://www.ExcelForum.com Hi simply =A2-A1 and format as time If your training time can span midnight use the formula =A2-A1+(A2<A1) >-----Original Message----- >Ok, i need a forumla. > >this is what ...

Quick Question
I have been using Office 2007 and OneNote for some time now and have recently set up the 2010 Beta on a second system. In the 2007 version there was a way to repair office if things went flaqky. How do I do that in Office 2010? Michael On Tue, 8 Dec 2009 23:59:26 +0000 (UTC), Rev. Michael L. Burns <sdbpastor@charter.bet> wrote: > >I have been using Office 2007 and OneNote for some time now and have recently >set up the 2010 Beta on a second system. In the 2007 version there was a >way to repair office if things went flaqky. How do I do that in Office 2...

Is there a quick way to...
highlighting only the odd or even numbered rows? Thanks. Something like this should do: Sub banding() ActiveSheet.Range("A65536").Select Selection.End(xlUp).Select lastrow = ActiveCell.Row Range("A6:AK" & lastrow).Select Selection.Interior.ColorIndex = xlNone 'Change rownum to the the first row number where data occurs rownum = 6 For i = 1 To (lastrow - rownum) Step 2 Range("B" & rownum + i & ":AK" & rownum + i).Select With Selection.Interior .ColorIndex = 15 .Pattern = xlSolid End With ...

Quick campaign- change to all quick campaigns
Does any one know how to set the following to default. In the quick campaign view, change 'my quick campaigns' to 'all quick campaigns' Cheers Sid ...

Quick Links Copy
Is there any way to copy Quick Links from one GP 10 user to another? Rich, I assume by "quick links" you are referring to the items on the user's Shortcut Bar. If this is correct, you can run the following query: INSERT INTO [DYNAMICS].[dbo].[SY01990] ([ScbGroupType] ,[ScbOwnerID] ,[ScbNodeID] ,[ScbParentNodeID] ,[ScbShortcutType] ,[ScbSubType] ,[ScbDisplayName] ,[ScbShortcutKey] ,[ScbTargetStringOne] ,[ScbTargetStringTwo] ,[ScbTargetStringThree] ...

Quick Part
When i add a new custom field E.g {DOCPROPERTY "Transaction Comments" }to my document (Type: Text) there is a restriction to 255 characters. Is there any way to increase this? Or is this a M/S word restriction that cannot be changed? Catherine wrote: > When i add a new custom field E.g {DOCPROPERTY "Transaction > Comments" }to my document (Type: Text) there is a restriction to 255 > characters. > Is there any way to increase this? Or is this a M/S word restriction > that cannot be changed? It is a restriction that can't be changed. I d...

need to reducing pages....i need to put the bottom part of a page.
i am working with three colums...i am down to cell 18,000...when i print my workbook it comes to 247 pages. what i want to do is put two pages that are portrait together on one page...maybe make them landscape so that i am printing less pages. also, i want to print on both sides of the page...please help If I may editorialize for a moment: is anyone actually going to read 247 pages of data? One solution may be to open a new tab within your workbook, summarize the two pages of data, and print from there. That will be much more manageable. As for printing both sides, you'll need to...

Quick Time
I have windows xp sp2,and want to know if I need Quick Time. Apparently it is not working correctly which it keeps reminding me, usually when I am on face book. So do I uninstall it and redo it or not? Thanks http://discussions.apple.com/forum.jspa?forumID=943 "didee58" <didee58@discussions.microsoft.com> wrote in message news:9E82461A-8192-407C-BAC7-10455759D56B@microsoft.com... :I have windows xp sp2,and want to know if I need Quick Time. Apparently it is : not working correctly which it keeps reminding me, usually when I am on face : book. So do I uninstal...

quick question
So I extended my Windows 2003 to support Windows 2008, making my schema version now 44. I do not wish to to install a windows 2008 DC, can I still use the features such as RODC and probably fine grain password policy etc? Howdie! On 30.03.2010 15:28, Nik wrote: > So I extended my Windows 2003 to support Windows 2008, making my schema > version now 44. > I do not wish to to install a windows 2008 DC, can I still use the > features such as RODC and probably fine grain password policy etc? No, you can't. For RODCs, you need a full-DC with Server 2008 in the hu...

CRM Sharepoint Web Part
Hi there, I'm having problems getting the CRM 3.0 web part working in Sharepoint and I suspect that it's to do with my configuration: I run Sharepoint on an SBS 2003 box and CRM 3.0 on a seperate 2003 member server. In the AD I've set the Sharepoint SBS box to allow delegation, however as this is SBS, you can't specifiy whether or not to use Kerberos Has anyone got it working using this type of setup before? K2 Download setspn from Microsoft Downloads. You can use SETSPN -L <ACCOUNT> This will tell you what SPNs are being used on either objects and services. ...

A Quick Question
Greetings: Could somebody please explain to me the difference between OnPaint and OnDraw? Thank you, Mark Roberts OnDraw will be called by the defualt implementation of OnPrint( ), passing the Printer DC. So you can check for CDC::IsPrinting( ) to know whether the DC object you got is of printer or display. "Mark Roberts" <mcroberts@sympatico.ca> wrote in message news:40325A3E.4070600@sympatico.ca... > Greetings: > > Could somebody please explain to me the > difference between OnPaint and OnDraw? > > Thank you, > Mark Roberts > OnPaint is calle...

Filter web parts working with DataView web parts problem
Hello, I'm following the steps in the following article to connect a Filter web part to a DataView web part: http://office.microsoft.com/en-us/sharepointserver/HA102509971033.aspx I follow the steps exactly for a choice drop down, and pass that value to the DataView, but it then displays no data versus the filtered value passed in? I don't see any obvious errors, typos, has anyone got the Choice filter to work successfully with a DataView web part that displays SQL Server data?, maybe I have to use functions like trim() or substr to make sure there are no extra spac...

Quick view
My new emails are not coming to quick view folder in windows live mail, how do I fix this. thanks in advance..!!! Rgds, Jay Windows Live Mail version ? - WLM Menu/Help/About Microsoft Windows Live Mail (press the Alt key if the menu is not present) -- ...winston ms-mvp mail "Jay" <Jay@discussions.microsoft.com> wrote in message news:39FB218A-6485-4866-830E-E2A97D9F1E2C@microsoft.com... > My new emails are not coming to quick view folder in windows live mail, how > do I fix this. thanks in advance..!!! > > Rgds, > Jay Try right...

Delete a custom margin from the Quick Access toolbar
I am using Word 2007 and created a custom margin on the Quick Access toolbar margin list. Now I realize that the printer needs to have .55 instead of .5 on the bottom margin. How do I delete that custom margin I created or make a correction to the original? Right-click on it. kalispunk wrote: > I am using Word 2007 and created a custom margin on the Quick Access toolbar > margin list. Now I realize that the printer needs to have .55 instead of .5 > on the bottom margin. How do I delete that custom margin I created or make a > correction to the original? ...

category quick click
Using Windows XP and Office 2007 No matter what color I set to be my quick click default in Outlook 2007, once I exit Outlook at return, the quick click setting is always "red." Any ideas on how to make the color I select for my quick click remain the default setting? Is outlook closing completely when you close it? Check task manager's processes tab to verify. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Outlook Tips by email: mailto:dailytips-subscribe-request@lists....

Where's the SEND button, part 2
Still missing the SEND button, even though I tried Nick's solution (see below). I tried several different ways to access the STANDARD toolbar, but all I get on the toolbar is: New, Print, Move, Delete, Reply, Reply All, Forward, and Find. In other words, there's no button for SEND or SEND/RECEIVE. This is frustrating. If anyone can give me some guidance, I'd greatly appreciate it. Thanks, once again. Subject: Re: Where's the SEND button? From: "Nick Ferguson" <temp@vscene.com> Sent: 12/8/2003 10:54:15 AM If you right click on the area whe...

Quick Question!
Hi All, I have a Dialog based MFC app, I want to draw something on the dialog, so How do I call an OnDraw method here? TIA Vai2000 wrote: > Hi All, I have a Dialog based MFC app, I want to draw something on the > dialog, so How do I call an OnDraw method here? > > TIA > > The dialog receives WM_PAINT. A better and safer way is to put a CStatic control (picture control) on your dialog template, then derive a class from CStatic. Create a control member variable (use class wizard) of your class in the dialog. Paint in your CStatic WM_PAINT message handler. -- S...

Quick Print in GP 10
In GP 10 with SP1 installed, a user uses the quick print functionality to print a sales work order. The order type is set up to use a Modified Long Form. If the user prints the order using the Print Sales Transaction option, the correct form prints. However, if the user presses <Ctrl-Q>, the non-modified version prints. I can't find anywhere to tell the system which form to use for Quick Print. -- Charles Allen, MVP Charles, The default document type seems to be linked to the Document Type ID in Sales Order Processing Setup. Go to Microsoft Dynamics GP >> Tools &g...

Can I show certain parts of a public folders calendar?
Hi I know I can show the content part using: http://exchange/Schools/OSK/?Cmd=contents what I want is to show only the smaller calendar in the right hand corner any idea how to do so? ...

quick views
All inbox option in the quick views works sometimes and then stops working. I unchecked the box in the quick views menu and then re-checked but I cannot get it to work properly or consistently. Being able to combine all inbox accounts is most helpful when this quick view option is working. Mail is moved to storage folders or deleted every few days. Version 2009 build 14.0 "frustrato" <frustrato@discussions.microsoft.com> wrote in message news:36E1CE20-FB66-4061-923B-2762B221EAED@microsoft.com... > All inbox option in the quick views works sometimes and the...

Quick Question...
Hello all, I'm working on a spread sheet Where row 1 is all headings. (Company name, state, tax bracket, etc...) How can I tell excel, to let just that row stay locked, so that when I scroll down the heading row stays at the top of the screen? Thank you for your help, Confused Man Hello Confused Man Select Row 1 and go to Window>Freeze Panes ** Posted via: http://www.ozgrid.com Excel Templates, Training, Add-ins & Business Software Galore! Free Excel Forum http://www.ozgrid.com/forum *** Thanks Dave Thats what I needed, but for some reason, when i would click on the 1 to se...

Junk / Spam Mail appearing in the Quick View Unread mail folder
Hi, How can I stop Junk / Spam mail appaearing in my unread quick view folder? They do not appaear within my inbox, as they go straight to the Junk / Spam folders of my individual mail accounts. Thanks There are several folders available in Quick views. Which folders are you viewing? Why did you say inbox when you have several accounts? Are you moving messages to one Inbox? -- Ron Sommer MS MVP-Mail "Jamie" <Jamie@discussions.microsoft.com> wrote in message news:F30A4E62-F155-4766-A099-50544F4A96E1@microsoft.com... > Hi, > > How can I ...

OWA
Hello, I am in need of some help. I have a issue with OWA timeouts. I have a bunch of users on MACs running OSX with Firefox 1.0.7. They are all saying that they are getting timed out well before the 15 minute basic connection timeout setting. Right now we are not able to upgrade FF to 1.5.0.x because of compatibility with a home grown app. Are there any cookie settings within FF on the MAC or something on the FE servers, where OWA is running, that I can tweak to allow connections to last the full 15 minutes? Thanks for any help that can be provided. Tom ...