Word VBA to save a macro word file to an anormal word file

  • Hi all


    I have word file and i'm using it for populate some data from excel to it , it's a macro file with some text label controllers.
    i'm trying to save the same file as it's with all the formatting to anew document but without the macros and labels controls but contents of labels should be there.

    Can someone help me with a macro for this?


    Thank in advance!!

  • Re: Word VBA to save a macro word file to an anormal word file


    Quote

    but without the macros

    No Problem...


    Quote

    ...and labels controls but contents of labels should be there


    You need to explain this and preferably upload a sample file.

  • Re: Word VBA to save a macro word file to an anormal word file


    Thanks cytop


    I attached a sample file for reference, this sample it has 2 tables as follows;


    1-First table contents some date linked from excel through VBA, if you click one of the numbers you can see that those numbers in said the text labels


    2- Second table which i'm trying to achieve , to make those number in-said the table without the text labels.




    Thanks

  • Re: Word VBA to save a macro word file to an anormal word file


    Sorry - I can't figure a way to move the Selection to the cell containing the label...


    Can loop through all the labels, can read the caption, delete the label but that's it...



    Just cannot figure out how to find the position of the field/label and move the insertion point there to re-insert the text

  • Re: Word VBA to save a macro word file to an anormal word file


    It's Ok,


    Good exercise to think about it and if you get some thing please let me know, also i will let you know if i figure out some thing to solve this issue.


    Thanks for help

  • Re: Word VBA to save a macro word file to an anormal word file


    Why are you using the labels in the first place...? Why not a normal field, a bookmark or anything other than a label...?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!