Solved

MS Office 2010 Format

Posted on 2013-05-17
3
371 Views
Last Modified: 2013-05-20
please see that we are using below code for generating stationary in our application.

Environment Details:-


Operating System = Windows 2008 R2 Enterprise Edition.
PowerBuilder Virtual Machine = PBVM 12.5 (means we are using PowerBuilder 12.5)
MS Office Template Used in application = Ms Office 2003.
We need to convert the template in = Ms Office 2010.


Code:-
li_result = ole_word.ConnectToObject("", "word.application")
IF li_result < 0 THEN
                li_result = ole_word.ConnectToNewObject("word.application")
END IF

IF li_result <> 0 THEN
                DESTROY ole_word
                ib_connected = FALSE
                MessageBox('MSWord Problem','Could Not Connect to MSWORD~n~nPlease make sure word runs properly on your machine~nRestart System')
                RETURN -1
END IF

ib_connected = TRUE
ole_word.Application.Visible = FALSE

RETURN 1

Our Application not allow to upload/attach the *.docx file. As mentioned in below screenshot.

Your kind help will be highly appreciated.
1.jpg
0
Comment
Question by:Netsol-NOS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 21
ID: 39176241
The issue is not with the code you posted but the code that opens the file selection dialog box. The  File Type filter needs updated to included the new document types.

Example:

openFileDialog.InitialDirectory = @"c:\"; openFileDialog.Filter = "Word 2000-2003|*.doc|Word 2007/2010|*.docx|All|*.*"; openFileDialog.ShowDialog();

Open in new window

0
 
LVL 2

Accepted Solution

by:
imtiaza earned 500 total points
ID: 39183391
Try some steps in the attached document.
Also perform some optimization in the code.
Microsoft-Office-2010-Optimizati.docx
0
 

Author Closing Comment

by:Netsol-NOS
ID: 39183418
50% solution.
0

Featured Post

Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question