Accessing an open word Doc

Salrandin

New Member
Joined
Jun 27, 2011
Messages
32
Office 2003,

How to I set my document variable to a word document that is already open? Would I use the documents.add function? And what would the path be if it is a newly created document? Thanks.
 
No problem.

The thing to remember with Word is that there is always a hidden character at the end of every paragraph/table cell which contains the formatting for it.

A Quick Observation: You actually want to use

myStr=left(myStr,len(myStr)-2)

as it seems there is also a space for it to match properly.. or you could say fudge it all and just use

Like "SOUTH*"

lol
 
Upvote 0

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
There shouldn't be a space there by default, maybe when you are placing text there it's adding a space. The last character should always be the cell marker, so doing this should work:

myStr=trim(left(myStr,len(myStr)-1))
 
Upvote 0

Forum statistics

Threads
1,216,030
Messages
6,128,408
Members
449,448
Latest member
Andrew Slatter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top