jagrenet
Board Regular
- Joined
- Feb 23, 2022
- Messages
- 81
- Office Version
- 365
- 2013
- 2011
- 2010
- Platform
- Windows
I have searched the Forums and found a multitude of "Find/Replace" scenarios but, did not run across any with my particular needs. I am quite possibly using the wrong approach altogether.
I have a report that comes out every month which requires some "massaging" of information, (by me) before it gets sent on to the client. There are only 4 or 5 areas of text that need to be changed so I figured if I could get an example of 1 then I should be able to figure the rest out.
In the Word document there is a sentence similar to - "This is my example sentence and it has the date November 2022 which obviously, is different every month."
With my code, I am trying to replace "November 2022" only, while leaving all of the other words untouched. I had thought about using InStr to get this done however, the length of the month will change .... so, I wasn't sure how to approach that exactly.
Also, to make things even more fun, I wanted to be able to use - DateSerial(Year(Now()), Month(Now()), 1) - with the Format of - NumberFormat = "mmmm yyyy" - in an attempt to keep things neat and tidy.
In addition, I would like to use certain variables which contain values from other (previous) sub-routines, in different areas of the Word document. for instance .....
ThisCustomer (would be a variable) and ThisCount (would be a variable) in the following example -
"ThisCustomer requested to purchase (ThisCount) of raffle tickets."
I hope this makes sense.
Thanks for taking a look.
Jeff
I have a report that comes out every month which requires some "massaging" of information, (by me) before it gets sent on to the client. There are only 4 or 5 areas of text that need to be changed so I figured if I could get an example of 1 then I should be able to figure the rest out.
In the Word document there is a sentence similar to - "This is my example sentence and it has the date November 2022 which obviously, is different every month."
With my code, I am trying to replace "November 2022" only, while leaving all of the other words untouched. I had thought about using InStr to get this done however, the length of the month will change .... so, I wasn't sure how to approach that exactly.
Also, to make things even more fun, I wanted to be able to use - DateSerial(Year(Now()), Month(Now()), 1) - with the Format of - NumberFormat = "mmmm yyyy" - in an attempt to keep things neat and tidy.
In addition, I would like to use certain variables which contain values from other (previous) sub-routines, in different areas of the Word document. for instance .....
ThisCustomer (would be a variable) and ThisCount (would be a variable) in the following example -
"ThisCustomer requested to purchase (ThisCount) of raffle tickets."
I hope this makes sense.
Thanks for taking a look.
Jeff