Гость
Форумы / Visual Basic [игнор отключен] [закрыт для гостей] / Автоматическое опознавание пользователя в Word / 4 сообщений из 4, страница 1 из 1
05.06.2003, 17:04
    #32177690
Ella
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Автоматическое опознавание пользователя в Word
Не знаю как решить!
Есть документ standard.dot, висит в Intranet.
Сотрудников около 250, и этот документ должен автоматически при открытии вводить личную информацию каждого конкретного пользователя, если я то меня и т.д.
Я сделала макро, при нажатии автоматически на определённое место в вводится информация из текстового файла о данном пользователе.
Но шеф желает, чтобы информация о пользователе вводилась не при нажатии, а автоматически при открытии standard.dot.
Как бы мне это сделать, возможно это?
Сам standard.dot висит в Intranet, и должен автоматом считывать информацию о любом пользователе, обратившимся к standard.dot.
...
Рейтинг: 0 / 0
05.06.2003, 17:13
    #32177706
Senin Viktor
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Автоматическое опознавание пользователя в Word
Есть событие Document_Open - может оно?
...
Рейтинг: 0 / 0
05.06.2003, 17:15
    #32177709
Ella
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Автоматическое опознавание пользователя в Word
Не знаю или ошибку где-то допустила или ещё что?
Не вышло у меня с ним.
А с помощью макро нельзя решить, небольшой я знаток VBA?
...
Рейтинг: 0 / 0
06.06.2003, 13:08
    #32178346
mahoune
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Автоматическое опознавание пользователя в Word
Ну почитай тут: http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b211659

А вот и выдержка из Help по Word
Auto Macros
By giving a macro a special name, you can run it automatically when you perform an operation such as starting Word or opening a document. Word recognizes the following names as automatic macros, or "auto" macros.

Macro name - When it runs
AutoExec - When you start Word or load a global template
AutoNew - Each time you create a new document
AutoOpen - Each time you open an existing document
AutoClose - Each time you close a document
AutoExit - When you quit Word or unload a global template

Auto macros in code modules are recognized if either of the following conditions are true.

The module is named after the auto macro (for example, AutoExec) and it contains a procedure named "Main."

A procedure in any module is named after the auto macro.
Just like other macros, auto macros can be stored in the Normal template, another template, or a document. In order for an auto macro to run, it must be either in the Normal template, in the active document, or in the template on which the active document is based. The only exception is the AutoExec macro, which will not run automatically unless it is stored in one of the following: the Normal template, a template that is loaded globally through the Templates and Add-Ins dialog box, or a global template stored in the folder specified as the Startup folder.

In the case of a naming conflict (multiple auto macros with the same name), Word runs the auto macro stored in the closest context. For example, if you create an AutoClose macro in a document and the attached template, only the auto macro stored in the document will execute. If you create an AutoNew macro in the normal template, the macro will run if a macro named AutoNew doesn't exist in the document or the attached template.

Note You can hold down the SHIFT key to prevent auto macros from running. For example, if you create a new document based on a template that contains an AutoNew macro, you can prevent the AutoNew macro from running by holding down SHIFT when you click OK in the New dialog box (File menu) and continuing to hold down SHIFT until the new document is displayed. In a macro that might trigger an auto macro, you can use the following instruction to prevent auto macros from running.

WordBasic.DisableAutoMacros
mahoune
...
Рейтинг: 0 / 0
Форумы / Visual Basic [игнор отключен] [закрыт для гостей] / Автоматическое опознавание пользователя в Word / 4 сообщений из 4, страница 1 из 1
Целевая тема:
Создать новую тему:
Автор:
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]