I don't know if this is the right forum, or should I post it in forum707
In VB6 (but that's not really relevant) I create some Word documents in the background and don't care to show it to the user. But Word 'flashes' on the screen anyway.
Here is a code sample (early binding of Word) to show what's going on:
Looks like [tt].Documents.Close[/tt] forces Word to show up on the screen :-(
Is there a way to NOT show Word at all
---- Andy
"Hmm...they have the internet on computers now"--Homer Simpson
In VB6 (but that's not really relevant) I create some Word documents in the background and don't care to show it to the user. But Word 'flashes' on the screen anyway.
Here is a code sample (early binding of Word) to show what's going on:
Code:
Dim ObjWord As New Word.Application
With ObjWord[green]
'.Visible = True 'I don't want to see Word[/green]
.Documents.Add
With .Selection
.TypeText Text:="This is a test in Word document"
.TypeParagraph
End With
.ChangeFileOpenDirectory App.Path & "\"
.ActiveDocument.SaveAs2 FileName:="MyTest04.docx", FileFormat:= _
wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles _
:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts _
:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False, CompatibilityMode:=15
[highlight #8AE234].Documents.Close[/highlight][green]
''' That's where Word shows up on the screen, so I do:[/green]
.Visible = False
.Quit
End With
Set ObjWord = Nothing
Looks like [tt].Documents.Close[/tt] forces Word to show up on the screen :-(
Is there a way to NOT show Word at all
---- Andy
"Hmm...they have the internet on computers now"--Homer Simpson