|
-
Mar 17th, 2005, 03:20 PM
#1
Re: Problem with Word-Bookmark with VB.NET
Well, does the listbox get loaded from a datasource?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 17th, 2005, 03:35 PM
#2
Thread Starter
Hyperactive Member
Re: Problem with Word-Bookmark with VB.NET
The listbox yes.
But not the Date textbox. And that was only as example. On my true form there is 8-10 input fields.
-
Mar 17th, 2005, 03:38 PM
#3
Re: Problem with Word-Bookmark with VB.NET
Yes, then your better off with a word template document using bookmarks.
What happens if you close the document (in code) before the doc is done printing?
Maybe you could get rid of the loop?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 17th, 2005, 03:45 PM
#4
Thread Starter
Hyperactive Member
Re: Problem with Word-Bookmark with VB.NET
No I can't really get rid of the loop.
For my problem,
Using this code:
VB Code:
Do While objWord.BackgroundPrintingStatus > 0
' needs Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sleep (250) ' pause quarter second
Loop
Instead of this:
VB Code:
Do While objWord.BackgroundPrintingStatus > 0
Application.DoEvents()
Loop
Helps a lot for speed between document. Now it doesn't freeze.
But still ... I want this to happen in the background ... but I see a Word window showing for a very little while .. just very quickly flashing, but still I don't want that.
-
Mar 17th, 2005, 03:53 PM
#5
Re: Problem with Word-Bookmark with VB.NET
You could minimize Word in code so it wont flash.
Also, I was meaning what happens if you take out the loop completely? Does it error when your code try to close the document?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 17th, 2005, 04:05 PM
#6
Thread Starter
Hyperactive Member
Re: Problem with Word-Bookmark with VB.NET
See .. in the taskbar we see a Word window for like a quarter second. And my screen does as if it was too busy .. hard to refresh ..
I don't know if there is a way to avoid that.
The document doesn't print If I close it while it is in the queue.
-
Mar 17th, 2005, 04:08 PM
#7
Re: Problem with Word-Bookmark with VB.NET
Just before it prints set the Application.Visible = False and then when its done printing set it back to True.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|