Using ms project 2007 and vba macro to list all the custom fields used in the project?

Hi,Using ms project 2007 vba macro, I would like to be able to list all the custom fields used in the project and their corresponding field names. e.g. let us say I create a calculated duration field and name it "expected duration" and the name
of the field I select is Duration1.
I am trying to write a macro that will list all the used custom fields such as the result would look like:
Duration1 ---> "expected duration"
Text1       ---> "anything"
Flag1        ---> "....."
Number1  ---> "..............."
Can anyone provide me with the solution?
Regards,
Chuck

John,
I found this module, which provides the the list of custom fields used in the project but does not provide the name given to the field. Here below is the module and hope you could help me achieve this by modifying the macro to list the renamed field.
' MSP Checks all Custom Task Fields
Sub checkfields2()
'This macro will check and report out which custom task fields are used
'It requires Project 2002 and above as it relies on the GetField
'and FieldNameToFieldConstant methods which were not introduced until
'2002.
'It does not include resource fields, however it is a simple matter to
'do it by replacing the pjTask constant with pjResource.
'Copyright Jack Dahlgren, Oct. 2004
Dim mycheck As Boolean
Dim myType, usedfields As String
Dim t As Task
Dim ts As Tasks
Dim i, it As Integer
Set ts = ActiveProject.Tasks
usedfields = "Custom Fields used in this file" & vbCrLf
myType = "Text"
usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
For i = 1 To 30
mycheck = False
it = 0
While Not mycheck And (it < ts.Count)
it = it + 1
If Not ts(it) Is Nothing Then
If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> "" Then
usedfields = usedfields & myType & CStr(i) & vbCr
mycheck = True
End If
End If
Wend
Next i
myType = "Number"
usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
For i = 1 To 20
mycheck = False
it = 0
While Not mycheck And (it < ts.Count)
it = it + 1
If Not ts(it) Is Nothing Then
If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> 0 Then
usedfields = usedfields & myType & CStr(i) & vbCr
mycheck = True
End If
End If
Wend
Next i
myType = "Duration"
usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
For i = 1 To 10
mycheck = False
it = 0
While Not mycheck And (it < ts.Count)
it = it + 1
If Not ts(it) Is Nothing Then
If Left(ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)), 2) <> "0 " Then
usedfields = usedfields & myType & CStr(i) & vbCr
mycheck = True
End If
End If
Wend
Next i
myType = "Cost"
usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
For i = 1 To 10
mycheck = False
it = 0
While Not mycheck And (it < ts.Count)
it = it + 1
If Not ts(it) Is Nothing Then
If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> 0 Then
usedfields = usedfields & myType & CStr(i) & vbCr
mycheck = True
End If
End If
Wend
Next i
myType = "Start"
usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
For i = 1 To 10
mycheck = False
it = 0
While Not mycheck And (it < ts.Count)
it = it + 1
If Not ts(it) Is Nothing Then
If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> "NA" Then
usedfields = usedfields & myType & CStr(i) & vbCr
mycheck = True
End If
End If
Wend
Next i
myType = "Finish"
usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
For i = 1 To 10
mycheck = False
it = 0
While Not mycheck And (it < ts.Count)
it = it + 1
If Not ts(it) Is Nothing Then
If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> "NA" Then
usedfields = usedfields & myType & CStr(i) & vbCr
mycheck = True
End If
End If
Wend
Next i
MsgBox usedfields
End Sub
This is what the module gives me. But I would like to have beside Text 1 the name that is shown as below. e.g Text1 is "Test".
Would you mind helping me achieve this?
Thanks in advance.
Chuck

Similar Messages

  • Hiding some level of grouping when the custom field is empty at Project Center

    Hi:
    I group some custom fields at the Project Center (portfolio/programs/subprograms), but some on this are empty (see the image). I want to eliminate this fields (subprograms; subprogramas in the image), but next level (the projects) must continue to be visible.
    Is it possible?
    Thanks 
    Pablo

    Your interpretation is right. But in real life is usual that exists projects  part of a program but that don't have a subprogram assigned (see for example the PMBOK  for the concept, i.e. unbalanced tree of programs/subprograms/projects). Again,
    it seems to me that MS PPM 2013 is a project server tool enhanced but not a REAL portfolio tool.  I wonder why Gartner put it in it's first magic quadrant ?
    Thanks again for you kindness.
    Pablo
    Montevideo, Uruguay
    South America

  • Task custom field and formula custom field don't correspond Project Server 2013

    Hi people, I have an interesting case in Project Server 2013 SP1 CU Apr:
    I have a custom task number field called AM. This field get's filled by a PSI action with actual material costs from an external system.
    I also have a custom task cost formula field that is called AM*. This field is a formula field that has the formula [AM]. And summary tasks use the formula field as well.
    As soon as I create a project, assign costs in the external system and let PSI fill the values within AM I get correct values in AM. But nothing is calculated on AM*. If I edit the project in the browser and publish, check in and revisit the project
    AM* still isn't filled.
    If I open the project in MS Project Pro the calculation comes through nicely, however I do not want to use MS project Pro to see correct data in browser.
    Some tests I have already done:
    I have noticed that when I create a new calculated task field AM2*, this get's calculated correctly on the already existing task.
    I have also noticed that opening the custom field in server settings and just saving the field creates correct values on AM*.
    What is going on? I don't want to save the custom formula field every day... There are 11 custom formula fields in the environment at the moment.

    Hi Gary,
    Thank you for the quick response. Please note that the fieldnames are [AM] and [AM*]. There is a difference in field name due to the astrix. However I did think about the situation and changing one of the field names all together didn't do anything for the
    situation at hand.
    It looks like some kind of refresh thing, because without changing anything in the custom field just saving the field in server settings will turn op good values. However, values already turned up good in Project Professional 2013. And that suggest
    that there is a calculation error on the PWA side wouldn't you say?
    Anyway, thank you for taking time to look into this matter.
    Erik

  • How to register User custom field using PHP?

    Hi!
    I am looking for a way to share user specific data between connected users. For example, all participants should know each other IDs(our own system IDs, not LCCS).
    User's custom fields looks the best solution for this, but I can't find a way to register one using PHP, while creating room.
    How to register User's  custom field using PHP? Or may be there are better solution to make such things?

    Got it, just need to add new node to UserManager collection.
    const USER_MANAGER_COLLECTION = 'UserManager';
    static private $USER_MANAGER_CUSTOM_FIELD_CONFIGURATION = array(
       'accessModel'=>self::ROLE_VIEWER,
       'publishModel'=>self::ROLE_VIEWER,
       'persistItems'=>true,
       'modifyAnyItem'=>false,
       'userDependentItems'=>true,
       'sessionDependentItems'=>false,
       'itemStorageScheme'=>self::STORAGE_SCHEME_MANUAL,
       'allowPrivateMessages'=>true,
       'lazySubscription'=>false,
       'p2pDataMessaging'=>false
    const USER_INVITE_ID_CUSTOM_FIELD = 'inviteId';
    static private function createUserManagerCustomFields($room){
       $account = self::init();
       $collection = self::USER_MANAGER_COLLECTION;
       $account->subscribeCollection($room, $collection);
       $account->createNode($room, $collection, self::USER_INVITE_ID_CUSTOM_FIELD, self::$USER_MANAGER_CUSTOM_FIELD_CONFIGURATION);

  • Using AppleScript to Launch Excel VBA Macro

    Using MS Office 2004 and AppleScript 1.9.3. I want to use AppleScript in MS Entourage to kick off a VBA macro in Excel. But no luck.
    To test things, I created an Excel file ("test.xls") with a one-line VBA macro named "test." It just puts up a dialog box with the message "success." I'm calling it from A.S as follows (per the AppleScript Dictionary for Excel 2004):
    tell application "Microsoft Excel"
    run VB macro "hard disk:users:xxx:desktop:test.xls!test"
    end tell
    I get two successive error messages:
    1. 'test.xls' cannot be accessed. The file may be read-only or you may be trying to access a read-only location."
    2. "Microsoft Excel got an error: "hard disk:users:xxx:desktop:test.xls!test" doesn't understand the run VB macro message."
    "test" file permissions are -rw-r--r-- and it is sitting right on the desktop.
    FWIW, I did not remove the old Office vX yet, but renamed old Excel "Microsoft ExcelOld". I read on some other site that this may cause problems.
    This has been endlessly frustrating. HELP!!??
    Steve

    Hi Steve,
    Have you tried dealing with the return value from your macro? If you are invoking the MsgBox function in your test macro, you may need to allow the return value from MsgBox to pass thru back to AS. Something like :
    set MyRetCode to run VB macro "Macintosh HD:Users:xxx:Desktop:test.xls!test"
    (Note unless you've changed the hard drive name to "hard drive", the default boot drive name will probably be "Macintosh HD". Case does matter here)
    I also suspect you'll need to have Entourage up as well in the full case of running a macro in Entourage from Excel (or the other way around). Hence, the command ActivateMicrosoftApp in the Excel dictionary may also be useful.
    Second, you can have a macro, in a startup template, in Entourage call a macro in a startup template in Excel to accomplish what you want without going into AppleScript at all. This latter, VB-only, method will require a "Reference", as it's called in VBA, to be added to the TemplateProject in Entourage that points to the Excel macro you want to fire off. The added benefit of this latter method is that you will have access to the full range of VBA commands/options, rather than the smaller dictionary available in AS.
    Ed
    PB G4   Mac OS X (10.2.x)  

  • I have to use microsoft office 2007 and 2003 for windows and I'm using a macbook pro, How i can get the on mac?

    I have to use microsoft office 2007 and 2003 for windows and I'm using a macbook pro, How i can get the on mac?

    You can either use Office for Mac 2011 or use Boot Camp to run Windows or use a VM, such as Parallels Desktop to run Windows. Running Windows, you'd be able to use MS Office for Windows.
    Clinton

  • HT1212 I am locked out of my iphone. In resetting my passcode I must have hit a wrong digit, because the 4 digits I thought I used Don't work (and of course not my old passcode).  I have tried the instructions both for "if you have previously synced your

    I am locked out of my iphone. In resetting my passcode I must have hit a wrong digit, because the 4 digits I thought I used Don't work (and of course not my old passcode). I have tried the instructions both for "if you have previously synced your device with iTunes" and "If you have Never synced your device with iTunes" . Neither has worked and I'm in a vicious circle with each time after lengthy downloads it still all ends with the program, & my phone, asking for my passcode to proceed.  I'm not sure if I have ever synced to my mac book (i may have) but my address book seems to automatically update on both devices without the need to plug in. Thank you for any knowledgable help that could efficiently get me  out of this passcode ****!

    Hi DRussell,
    If you have not sync'd your device to your Mac then you will have to force the phone into recovery mode and restore as a new device. Read the information in this link and follow the instructions to recover the phone:
    http://support.apple.com/kb/HT1808
    Hope this helps!
    Cheers,
    GB

  • HT201251 I want to use 30  ipads to run kiosk software in my restaurant. Can I use one Apple ID (and one credit card) for all devices

    I want to use 30  ipads to run kiosk software in my restaurant. Can I use one Apple ID (and one credit card) for all devices?

    Alternatively you can always manage your iPads (does not matter how many) with a single apple id and all reporting to your account under "find my device" service. Keeping an eye on all your units. Additionally as you mentioned these are for your Restaurant you may find the solutions offered by this company who creates apps and hardware for this purpose: http://www.spartakioskpro.com
    Additionally if you expand beyond those 30 iPads to say 300 you will want to enable or plan on MDM as your best option to automate every ipad to use the same profile and app and ios configuration while also keeping a close eye on all of them via online MDM services like: https://meraki.cisco.com/products/systems-manager
    Here is a pic

  • Hi, I m using an iPhone 4 and my yahoo push email was working just fine but for the last few days I am experiencing some problem that is the emails are not getting pushed , I have to manually fetch the mails. So what could be the reason for this....

    Hi, I m using an iPhone 4 and my yahoo push email was working just fine but for the last few days I am experiencing some problem that is the emails are not getting pushed , I have to manually fetch the mails. So what could be the reason for this.....I have set the email setting to "push" mode. Moreover I can't edit the mail server address ....current it's on Yahoo SMTP server

    Will it get rectified and restored...if so after how long. What could be the reason for such outage kindly share,  as I am facing real problem because of this...

  • Hashing of the password field using MD5 and then store in the XML

    Hi,
    I need to design a form with User ID and a Password field. When i extract the XML from the form i need to hash the password field using MD5 and then store it. Does anyone have some kind of experience in doint it. Can you please suggest some way to do it.
    Thanks,
    Sayoni.

    Hi,
    To hash password you can use function from http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_md5/ or try to find another implementation. Just call this function on some event like button click for example.
    Also I made some example. See attach.
    BR,
    Paul Butenko

  • Update Custom Field in Task Level Project Server using JSOM (PS.js)

    Does anyone have javascript
    which updates the task level custom field?
    I just have the code with C#. I am trying to convert this code to javascript (below). But the javascript code had failed in update process. When I see queue jobs, JobState: Reporting (Project Sync) | JobStatus: Failed But Not Blocking Correlation.
                        DraftProject projCheckedOut = proj2Edit.CheckOut();
                        projContext.Load(projCheckedOut.Tasks);
                        projContext.ExecuteQuery();
                        DraftTaskCollection tskcoll = projCheckedOut.Tasks;
                        foreach (DraftTask tsk in tskcoll)
                            if ((tsk.Name != null) && (tsk.Name == "Your task name"))
                                projContext.Load(tsk.CustomFields);
                                projContext.ExecuteQuery();
                                foreach (CustomField cus in tsk.CustomFields)
                                    if (cus.Name == "Your custom Field")
                                        string intname = cus.InternalName.ToString();
                                        string cusvalue = tsk[intname].ToString();
                                        tsk[intname] = "Your new value";                                   
                                        msg = "customfield  - " + "original
    " + cusvalue + ": new " + tsk[intname].ToString();
                        projCheckedOut.Publish(true);
                        QueueJob qJob = projContext.Projects.Update();
                        JobState jobState = projContext.WaitForQueue(qJob, 200);
    Thanks a lot.

    Hi Andre,
    I'm afraid there's no way to update the Task Level Custom Fields using JSOM. I had the same requirement in the past, searched for a long time to a solution, without any result. Also other similar posts are not having a valid solution:
    https://social.msdn.microsoft.com/Forums/en-US/8cc94344-9462-4cee-8490-6083c35f3de1/user-resource-custom-field-update-using-csom?forum=project2010custprog
    https://social.msdn.microsoft.com/Forums/en-US/83f2dedb-6d30-466e-8663-5e450f0e5eb2/how-to-add-custom-field-to-the-task-via-csom?forum=project2010custprog
    http://stackoverflow.com/questions/25853398/updating-task-level-custom-fields
    Correct me if I'm wrong but as far as I know JSOM has no methods to update task, assignment or resource custom fields.

  • Hello all, I bouhgt a TV serial using my apple tv2 and my Apple ID information: all good. But then I got an e-mail from apple saying that an "unknown" user downloaded con ten using my apple ID. Nobosy stoled anything. How do I get my particular apple TV2

    Hello all, I bouhgt a TV serial using my apple tv2 and my Apple ID information: all good. But then I got an e-mail from Apple saying that an "unknown" user downloaded content using my apple ID. Nobody stoled anything. How do I get my particular apple TV2 to recognize my apple ID account so it knows it is me who is buying. Thank you so much.

    Dear AC,
    Thank you so, so much for this answer. I did go into my Apple ID account through iTunes store and associated my devices to my Apple ID account. I did this by working on my computers (a mac mini and a mac air) and my two devices (iPhone and iPad). Thus there is a statemente saying "4 devices are associated with this apple ID and can download your purchases from iTunes in the iCloud". So whenever I use them to purchase anything, iCloud knows it is me through my devices so I do not get no e-mail warming me my account might be being used by a stranger.
    So, how do I associate my apple Tv2 to my apple ID account? I went to its settings and could not find any way of doing it. Can you continue helpling me? Please.
    Thank you so so much

  • To read all the database fields used in a Crystal report 10 file using Vb 6 Code

    Hi
    Iam in development of an Application in Visual basic which lists all the
    database fields used in a particular report (crystal 10)
    In simple i need to show all the checked fields in the database fields section in field explorer section of the crystal report file.
    regards
    venkateshG

    Please re-post if this is still an issue to the Legacy Application Development SDKs Forum or purchase a case and have a dedicated support engineer work with you directly

  • What are the key fields used to group double orders in t-code SDD1?

    What are the key fields used to group double orders in t-code SDD1?
    Cheers,
    VT

    Hi,
    You can group the duplicate sales documents with the help of the following fields,
    Sold-To-Party,Document type,date and sales area details.
    Regards,
    Gopal.

  • How to Generate sales orders with custom Fields using BAPI_BUSPROCESSND_CREATEMULTI

    Hi,
    I need to generate sales orders with custom fields on table CRMD_ORDERADM_H using BAPI_BUSPROCESSND_CREATEMULTI, after changing the structure BAPI_TE_CRMD_ORDERADM_H, and feed the  EXTENSIONIN table of the BAPI with data, the order is created, but any value on custom fields.
    After debuging, I saw that the BAPI search for structure conversion in table CRMC_OBJECTS_GEN, but we haven't entry with BAPI_TE_CRMD_ORDERADM_H in this table. is that the problem ?, Is there any way to fix it?
    Best Regards,
    Salah.

    That depends on where do you have the customer fields, check the table CRMD_CUSTOMER_H, if your custom fields are there, you need to use the changing parameter CUSTOMER_HEAD, I guess your already checked that one, right? but there's no custom fields, well...AET/EEWB doesn't enhance the strcuture of the BAPI, so you should do it manually, check the note following note for further details.
    988410 - FAQ: User-defined fields in the BAPI
    If you don't have access to the SAP Marketplace, in resume you should create an append on the structure BAPIBUS20001_CUSTOMER_H and include the following strcutrue CI_EEW_CUSTOMER_H
    Cheers!
    Luis

Maybe you are looking for