Bacalhau75
New Member
- Joined
- Jul 9, 2014
- Messages
- 12
Hi, I work in a large company and I've been asked to write a macro to 'find / replace' text within publisher docs to facilitate the process since there are 1000's of documents that require the same update. It's my first time working with Publisher and already learned that there is no 'Record' function and examples on Google are limited.
I got the macro working for the most part, but I'm stuck at a simple 'Sendkeys' function or possibly something using chr(10)/chr(13). ( i tried both together and excel locks up while chr(10) or chr(13) don't seem to do anything.
Part of the document contains an outline.
A. something something
Paragraph continues here
A little more blah blah
B. Something new here
Continues down here
And it ends here.
The code searches for "And it ends here." and i'm trying to replace it with =
"And it ends here.
C. Something new for bullet C
Continues down here
And it ends here"
I've been able to to replace the text, but it does not place the C as it's own bullet entry. It think it's part of B', so it looks like this.
B. Something new here
Continues down here
And it ends here.
C. Something new for bullet C
Continues down here
And it ends here"
i overcame the limitation of 255 characters for a variable, but can't figure out how to paste part of the replaced text, hit enter in order to create a new bullet ("C") and then paste the rest of the text.
Any help would be greatly appreciated.
Thanks,
I got the macro working for the most part, but I'm stuck at a simple 'Sendkeys' function or possibly something using chr(10)/chr(13). ( i tried both together and excel locks up while chr(10) or chr(13) don't seem to do anything.
Part of the document contains an outline.
A. something something
Paragraph continues here
A little more blah blah
B. Something new here
Continues down here
And it ends here.
The code searches for "And it ends here." and i'm trying to replace it with =
"And it ends here.
C. Something new for bullet C
Continues down here
And it ends here"
I've been able to to replace the text, but it does not place the C as it's own bullet entry. It think it's part of B', so it looks like this.
B. Something new here
Continues down here
And it ends here.
C. Something new for bullet C
Continues down here
And it ends here"
i overcame the limitation of 255 characters for a variable, but can't figure out how to paste part of the replaced text, hit enter in order to create a new bullet ("C") and then paste the rest of the text.
Any help would be greatly appreciated.
Thanks,