I have a small program set up for submitting requests and getting those requests approved, whereby the program writes new requests to a table and keeps track of when they are approved, denied, etc., and it also sends an email notification when a request is submitted, when someone goes in and approves it, etc.
I would like to take this a step further and have the option to print a given request out in a nice form layout, whenever one is needed. I was wondering if it would be possible to set up a Word document with a table in it, and then have my code automatically populate specific cells in the table with the data that is unique to that particular request, and then have it print the completed document. There would not really be any need that I can think of to save the changes to the document.
Does this sound like a good way to do this, and if so, can someone get me pointed in the right direction on starting this, or to some sample code that would do this? I have experimented with setting and opening a Word document object in my code, and using .TypeText to add information to the empty document, however what I'm struggling with is getting it write that text to very specific places within the document, for example into a table as I mentioned above.
Or, if there is a better way to do this, I'm open to suggestions.
Thank you,
Kevin
I would like to take this a step further and have the option to print a given request out in a nice form layout, whenever one is needed. I was wondering if it would be possible to set up a Word document with a table in it, and then have my code automatically populate specific cells in the table with the data that is unique to that particular request, and then have it print the completed document. There would not really be any need that I can think of to save the changes to the document.
Does this sound like a good way to do this, and if so, can someone get me pointed in the right direction on starting this, or to some sample code that would do this? I have experimented with setting and opening a Word document object in my code, and using .TypeText to add information to the empty document, however what I'm struggling with is getting it write that text to very specific places within the document, for example into a table as I mentioned above.
Or, if there is a better way to do this, I'm open to suggestions.
Thank you,
Kevin