Solved

MS Office 2010 Format

Posted on 2013-05-17
3
363 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
3 Comments
 
LVL 21
Comment Utility
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
Comment Utility
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
Comment Utility
50% solution.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now