Hi,
I have a question about the automation of Word objects. With following code
I open a word document:
$services = @(Get-Service)
$msWord = new-object -ComObject "word.application" -ea silentlycontinue
$wordDoc = $msWord.Documents.Open("somedocument.doc")
....do something with the worddoc....
$msWord.Documents.Close()
$msWord.Quit()
With the PS script, I want to make a batch processing over a lot of
documents. In some cases, a word file might be used by another user or there
might be a further inquiry with a dialogbox. In this case, the script will
wait for an user interaction. Is it possible to make a automation for those
user inquiries?
Thanks a lot for helping me! :-)
Bye, Volker
|
|
0
|
|
|
|
Reply
|
Utf
|
5/5/2010 11:56:01 AM |
|
> With the PS script, I want to make a batch processing over a lot of
> documents. In some cases, a word file might be used by another user or
> there
> might be a further inquiry with a dialogbox. In this case, the script will
> wait for an user interaction. Is it possible to make a automation for
> those
> user inquiries?
> Thanks a lot for helping me! :-)
Are you able to provide a bit more details? I'd like to think you can do
anything...
Marco
|
|
0
|
|
|
|
Reply
|
Marco
|
5/5/2010 12:06:26 PM
|
|
"Marco Shaw [MVP]" wrote:
> > With the PS script, I want to make a batch processing over a lot of
> > documents. In some cases, a word file might be used by another user or
> > there
> > might be a further inquiry with a dialogbox. In this case, the script will
> > wait for an user interaction. Is it possible to make a automation for
> > those
> > user inquiries?
> > Thanks a lot for helping me! :-)
>
> Are you able to provide a bit more details? I'd like to think you can do
> anything...
>
> Marco
>
Hi Marco,
in detail, we want to check every word document for the used template path.
A lot of documents are containing a private network path. If you open this
document outside the intranet, it takes several minutes. So, we want to check
for the path with:
....
$template = $wordDoc.AttachedTemplate.FullName
if ($template.Contains("`\`\")) {
....
If there is a reference to a private networt path, we change and save the
file.
The problem is now, that a lot of files require a user interaction while
opening the file with powershell. For example, if another user has the file
in use, a dialog box will appear and the powershell script will stop and
wait. I want to know, how it is possible to handle those user interactions
with powershell. Do you need more details?
Best wishes!
Volker
|
|
0
|
|
|
|
Reply
|
Utf
|
5/6/2010 8:57:01 AM
|
|
|
2 Replies
407 Views
(page loaded in 0.093 seconds)
Similiar Articles: Word Automation - microsoft.public.windows.powershellHi, I have a question about the automation of Word objects. With following code I open a word document: $services = @(Get-Service) $msWord = ... Word Automation Problem - microsoft.public.accessHi, I am trying to use Word as a report writer via automation from Access. I am trying to print an invoice that contains pre-defined bookmar... Word Automation from Access - microsoft.public.accessWord Automation Problem - microsoft.public.access Hi, I am trying to use Word as a report writer via automation from Access. I am trying to print an invoice that ... Word 2007 automation - setting default conversion for InsertFile ...Hi I need to insert some HTML-styled text into a Word 2007 document. As far as I know you cannot directly insert HTML into Word, because it needs... displaying hyperlink in automation to Word - microsoft.public ...I have a field in a table that shows hyperlinks with a different caption (i.e. if the web address is www.pbs.org, I display the link as "PBS"), but wh... PowerPoint automation problem - microsoft.public.powerpoint ...Hi there, I have a problem concerning PowerPoint automation. To illustrate the problem I wrote a simple test app in c# that looks like this: u... XL file opened using automation - how close? - microsoft.public ...I have a program that is run by Scheduled Task. This program opened an XL file using automation as designed, however, now the file is hanging open a... Access - Outlook Mail Automation: SendUsingAccount - microsoft ...Word Automation from Access - microsoft.public.access Access - Outlook Mail Automation: SendUsingAccount - microsoft ... Word Automation from Access - microsoft.public ... Automation Object Error Message - microsoft.public.access.forms ...THE CONTEXT I am building a personnel database to store various types of information on staff. I have one table [tblStaff] at the centre of the da... Getting Error: Word cannot print. There is no printer installed ...NOTE: This automation problem is not happening when used with server 2003. Operating System: Windows Server 2008 64 bit. Printer: Any normal pri... Home | WordAutomation.com | Experts in Document AutomationTemplates and Services for Microsoft Word Word Automation provides document automation solutions to legal, education, government and corporate markets. Word automation using C# - C#, Visual Studio 2010, Silverlight ...Word Automation through C# is all about programmatically generating the Word Document using C# code. Almost all of the tasks which we perform on word 2003 can be done ... Word Automation - CodeProjectWord Automation using Early Binding and Late Binding.; Author: Prathapachandran.v; Updated: 9 Nov 2007; Section: Office Development; Chapter: Enterprise Systems ... Word Blog - Introducing Word Automation ServicesOver the last couple of months, we've posted about many of the exciting new features of Word 2010 – Co-authoring, the new Find experience, and the Word Web App. Word automation using VB - VB.NET Heaven: Free Visual Basic .NET ...This article is tells you about Word automation through VB, which is all about programmatically generating the Word Document using VB code. 7/20/2012 3:02:07 AM
|