I am running a macro through the normal.dot file. What I want to do is assign ActiveDocument.path to a variable. But when I do this I the error "Invalid Outside Procedure". What am I doing wrong?
My code:
path2file = ActiveDocument.path
sfile = FreeFile
Open path2file For Input...
hi pe,
I think you need to implement a range. Try this link. It documentation specifically VBA programming for Excell. They talk about ranges in detail.
http://www.dummies.com/extras/vba_fd_3e/08563BonusC.pdf
Mona
hi pe,
I think you need implement a range. Try this link. It documentation specifically VBA programming for Excell. They talk about ranges in detail.
http://www.dummies.com/extras/vba_fd_3e/08563BonusC.pdf
Mona
sfvb,
I just tested it the way you did and still output hasn't come out this way. This time I just pressed F5, no breakpt and nothing. What am I doing wrong?
Mona
sfvb,
This is exactly what I had expected. I must be running the script wrong. I am new to VBA. Could you tell me how are you running the script? Currently I am running it in debug mode with a breakpt and pressing the button that looks like a play button on your VCR.
Mona
I am doing a string search within a open Word Document. I know string exist in the document but my comparison is telling me that it can not find it. Could someone shed some light as to what I could be doing wrong?
Private Sub InsertSymbol(RedStrikeText)
With ActiveDocument.Content.Find...
If the path is correct and the file exists then check your server's security settings. If isn't that check if your are saving a file that is only read-only permissions.
Hi segmentationfault,
It is possible to read the document line by line. Use Input# function. I started thread in this forum about this and someone gave some very good examples of it. I was wondering if you are planning change the font green on a particular line of code. I am working a similar...
I am having trouble testing what values I am getting in my variables. I know the command is "Print". I tried Print and just the variable but a error saying I need a object to use this command? How can I get my values to print?
the file I am trying to read is a Rich Text Format document.
I am trying to do a search through the doc for /strike and /cf6. Meaning this text that has strikeout and is red highlighted.
Thank you for all you help. There one thing I am not clear of. I want to use this function inside of a macro in a word document. The file I want to use is already open. I do not think i need to open it again but in the open statement the file is marked as input. Is there way I can avoid using...
Thank you to both of you! Both these examples were very helpful. I was wondering something else. I thinking to use this Input function in a macro. The problem is the file I want to use is already open. I don't think I need to use an open command but using this Input function it looks like I will...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.