Home |
Search |
Today's Posts |
#1
|
|||
|
|||
enter in a part of a word document
This is my first post. Best Regards everybody.
a VB script for enter in word to a part of the document (a prefixed page, a mark, a table, a jpg, a comment ? , the first occurrence of a character string, a epigraph....... ) I would like enter in a word document looking for a text string and position the cursor in the string. I will know the existence of this chain always, so any other mark or signal would be enough. All I need is enter in a certain part of a document identified previously. Thanksxxx |
#2
Posted to microsoft.public.word.newusers
|
|||
|
|||
enter in a part of a word document
Why not use EditFind?
-- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "Esgrimidor" wrote in message ... This is my first post. Best Regards everybody. a VB script for enter in word to a part of the document (a prefixed page, a mark, a table, a jpg, a comment ? , the first occurrence of a character string, a epigraph....... ) I would like enter in a word document looking for a text string and position the cursor in the string. I will know the existence of this chain always, so any other mark or signal would be enough. All I need is enter in a certain part of a document identified previously. Thanksxxx -- Esgrimidor |
#3
Posted to microsoft.public.word.newusers
|
|||
|
|||
enter in a part of a word document
Please do not post the same questions in multiple groups
Dim sMark As String sMark = InputBox("Term to find") With Selection .HomeKey wdStory Do While .Find.Execute(sMark) = True .Range.Characters(1).Select Exit Do Loop End With will select the first character of the requested term -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Esgrimidor wrote: This is my first post. Best Regards everybody. a VB script for enter in word to a part of the document (a prefixed page, a mark, a table, a jpg, a comment ? , the first occurrence of a character string, a epigraph....... ) I would like enter in a word document looking for a text string and position the cursor in the string. I will know the existence of this chain always, so any other mark or signal would be enough. All I need is enter in a certain part of a document identified previously. Thanksxxx |
#4
|
|||
|
|||
I'll try and comment the results.
Thanksxxx and excuse me for multiple posting. Edited : I have seen The TOC . Another purpose may be go to a part of the TOC in the document Thanksss Last edited by Esgrimidor : August 24th 09 at 05:40 PM |
#5
|
|||
|
|||
[quote=Doug Robbins - Word MVP;430236]Why not use EditFind?
Because I need to enter in the word document automatically to that bookmark from the "exterior". A vbs script from start - execute may be. Best Regards |
#6
|
|||
|
|||
Quote:
I need automatically by this script : 1. Open a Word document 2. Go to a prefixed part of this document without my intevention. Examples : 1. Open the document C:\path\inform\document.doc and goes to the page 10 2. Open the document C:\path\inform\document.doc and goes to the bookmark "wordbanter" in page 25 I think I can do this in many ways. One perhaps I am able is preparing an "internal" macro to go to a part of that document when I execute the macro from inside the document. Using word modifiers of the command line execute the macro at the same time I open Word. 8http://office.microsoft.com/es-es/word/HP101640103082.aspx?pid=CH100487463082 ) But what I really want to know is the code in VB to make a script to execute outside Word. (please, I only have a text editor and don't need the script to be compiled,,). For me is enough a .vbs file. That is : Start - Execute - script.vbs This script.vbs may have the code for opening the desired word document and goes to a certain part of this document automatically. I don't know the names in english, I supposed are mark, perhaps bookmarks, parts of the index, epigraph, I don't know the name in english. My idea is put this script.vbs as a link in other program. So I can go from a program to a certain part of my word document. With your code I have put in the word visual editor this code : Sub findedit32 () Dim sMark As String sMark = InputBox("Term to find") With Selection .HomeKey wdStory Do While .Find.Execute(sMark) = True .Range.Characters(1).Select Exit Do Loop End With endsub and works fine, but it's not my intention. I am not a programmer. Perhaps in many years using word 2002 I need now something more specific. It's difficult for me because probably i will forget anything about it when I get it. I would like a link of similar code as a repository. It's not strange touch many doors when everybody assumes that I have a great knowledge about programming. I know nothing. I am a lucky man with excel 2002 and my new links in word or other external program (not in office) that opens Excel book by a prefixed sheet in it and a prefixed cell. And will be very happy going to a word document to a certain page, bookmark, string, part of the document map, etc. I have previosly indicated manually in the script. And the script automatically open the word document by the part indicated. Best Regards |
#7
|
|||
|
|||
Quote:
Thanks Excuse my language. I'm from Canary Islands |
#8
|
|||
|
|||
In a bat with the line :
"M:\Archivos de programa\Microsoft Office\Office10\WINWORD.EXE" /t "Y:\GABINETE\PROYECTOS\125.09\125.09.Proyecto. doc" /mmacro3 mmacro3 is a macro to go to a bookmark in the desired and expressed word document. This bat may be linked from an excel cell or other possible hyperlinks. I would like to know how are the methods or systems to go anywhere inside a word document : part of the TOC, epigraph, etc. Can you indicate me a good link to see the scripts tha make possible to find and go everywhere in a word document ? Thanskkkxxxx |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to link part of TOC to part of body in document | Microsoft Word Help | |||
can you enter data in part of a word doc and update other areas? | Microsoft Word Help | |||
E-mail part of a Word document to someone (not the entire document | Microsoft Word Help | |||
print preview of my word document shows only part of document why | Microsoft Word Help | |||
Enter a prompt, have it enter my answer in the document | Mailmerge |