Issue with Windows 2012, Notes 9 and Word 2013

I am putting this is multiple Forums (development and admin) so, please bare with me.

We have a process currently running in production today. Scheduled agent (LotusScript) that runs on server (Win 2003) to generate PDF (via PDFCreator), then runs Word 2007 to create a table of contents and then ports it all over to Adobe in .pdf format. Works great and has been for years.

Now, we are in the process of upgrading all of our servers to Windows 2012 64 bit, Notes 9 32 bit and Office 2013 32 bit. During testing, we are noticing that the Word portion of the code is no longer working. The code does load Word 2013 (viewed through Task Manager on server) but, we can’t seem to get a handle on it to perform the rest of the functionality. We have added in extra code to test for Null or Nothing and still runs the exact same, as if it does recognize Word but, does nothing.

Testing new piece of code locally, Word 2013 does load up on the screen. Moving that exact code over to the new server, Word 2013 does load in task manager BUT never loads on the screen. Also, the rest of the code does NOT run. This code is a simple TypeText that just adds text to the blank document. In fact, here is the test code that works locally (laptop) but NOT on server. By not work I mean there are no errors or anything being thrown. It runs, loads up Word 2013 (as viewed in Task manager) but does not add text to document or save it:

Sub Initialize
Dim msWord As Variant
Dim msDoc As Variant
Dim msText As Variant

On Error Resume Next

Print “Loading Microsoft Word…Please Wait…”
Set msWord = GetObject(“”, “Word.Application”)

If msWord Is Nothing Then
Set msWord = CreateObject(“Word.Application”)
End If
Print “Microsoft Word Loaded”

msWord.Visible = True
Print “Microsoft Word Visible”

msWord.documents.Add
Print “Microsoft Word added new blank document”

msWord.Selection.TypeText(“and you know my name is Simon…”)
Print “Microsoft Word added text”

Dim msFileName As String
msFileName = “C:\temp\JasonCyr.doc”

msWord.ActiveDocument.SaveAs2 msFileName$
Print “Microsoft Word saved new document”

Print “Loading complete”
End Sub

My questions are, is anyone else doing anything similar to this and does it work for you? Also, is there perhaps some setting (windows server, word, notes 9, security even) that we are missing? Finally, does anyone know what logs are out there on the server to help us troubleshoot Word 2013 in case that is throwing an error in backend and we just don’t see it up front?

Any help would be greatly appreciated.

Subject: From experience…

I strongly suggest creating a new template, in a blank docx file

Because even copying (e.g.) images from a .doc to a .docx file buggers up the file format

Same problems occur with .xls and .xlsx files

Subject: Wondering

is the domino server 32 ot 64 bit ?

Is the Word 2013 32 or 64 bit?

Did you manually run the word 2013 under the same id that the server is running under? Just trying to rule out permission issues. I looked at this link and wonder also if .net is installed? System requirements for Office 2013 | Microsoft Learn https://technet.microsoft.com/en-us/library/ee624351.aspx#section26

I also found this

Application object (Word) | Microsoft Learn https://msdn.microsoft.com/en-us/library/office/ff838565.aspx Convert the code to lotusscript and see if you at least a document to open.

Set wrd = GetObject(, “Word.Application”) wrd.Visible = True wrd.Documents.Open “C:\My Documents\Temp.doc” Set wrd = Nothing

Subject: Create new template???

When you say new docx template, do you mean

msWord.documents.Add(“C:\temp\JasonCyr.docx”)

If not, what exactly are you referring to?

Thanks for your response

Subject: The problem is in Word

You are trying to create a .doc - word is now .docx and will whinge and pop up a window to confirm that’s what you want - in a server agent, there’s no way to respond to that whinge

You need to create a new .docx template from scratch - you can’t just save-as your existing one - and open that instead

Subject: Timing issue in COM object initialization

There appears to have been a change in how Microsoft Office COM objects initialize starting with Office 2010.
In previous versions once the GetObject / CreateObject call returned you could immediately start using it.

In most cases adding a pause {sleep(1)} before doing anything with the object fixes this problem.

Have fun.

Ninke.

Subject: Did you get this resolved?

We are having the same issue at our organization. Were you able to resolve this?

Subject: Did you get this resolved?

We are having the same issue at our organization. Were you able to resolve this?

Subject: Template

Like I said run word on the server and you would see that the issue is with the template. Here is a url on how to convert the template Edit templates - Microsoft Support https://support.office.com/en-ca/article/Edit-templates-b2cb7adb-aec2-429f-81fd-3d5bd33cf264