How Implement FilePrintSetup (part of Word Application)

vittorio1973
Member Posts: 26
Good Afternoon,
I need to implement the following code in NAV
Set oWord = CreateObject("Word.Application")
oWord.WordBasic.FilePrintSetup Printer:="HP LaserJet 4 on LPT2", _
DoNotSetAsSysDefault:=1
Exactly I am not able to do the second VB line code
I have defined oWord as 'Microsoft Word 12.0 Object Library'.Application variable
But as soon as I try to implement oWord.WordBasic I receive the following error
"The returned value should be used for this function"
Please help since I am not able to print on a different printer than the default one using Citrix
Thanks for your help
I need to implement the following code in NAV
Set oWord = CreateObject("Word.Application")
oWord.WordBasic.FilePrintSetup Printer:="HP LaserJet 4 on LPT2", _
DoNotSetAsSysDefault:=1
Exactly I am not able to do the second VB line code
I have defined oWord as 'Microsoft Word 12.0 Object Library'.Application variable
But as soon as I try to implement oWord.WordBasic I receive the following error
"The returned value should be used for this function"
Please help since I am not able to print on a different printer than the default one using Citrix
Thanks for your help
0
Comments
-
Hi vittorio1973,
Why don't you try to use ActivePrinter property from WordApp?.
Something like this:DefaultPrinter := WordApp.ActivePrinter; WordApp.ActivePrinter := NewPrinter; . . . //do something . . . WordApp.ActivePrinter := DefaultPrinter;
0 -
Hi thanks for your reply,
I have already tried to do that and it works in a normal environment but on CITRIX it doesn't work.
In fact, when I use your suggested procedure on Citrix NAV ignores the selected printer and it prints on the default printer.
That is why I am trying another alternative that is the one I have written but I don't know how to implement it on C/Side, so if you have any suggestions about that please let me know
Thanks0 -
Hi All,
has anybody got any suggestions to my issue?
Or about how to write the code in C/Side or any alternative solution to avoid Citrix from continuing to print using the default printer?
Thanks a lot0 -
Hi again,
since it is very important, please can anybody give me any suggestions to resolve my issue?
Thanks0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions